Add furigana support

main
Elnu 2 years ago
parent b6d8801727
commit 8165163089

@ -12,6 +12,6 @@
{{ partial "metadata.html" . }}
</header>
<br>
{{ .Content }}
{{ partial "content.html" .Content }}
</article>
{{ end }}

@ -2,7 +2,7 @@
{{ partial "pagination.html" . }}
{{ if eq .Paginator.PageNumber 1 }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "content.html" .Content }}
<hr>
{{ end }}
{{ range .Paginator.Pages }}
@ -11,7 +11,7 @@
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ partial "metadata.html" . }}
</header>
{{ .Content | truncate 500 }} <a href="{{ .RelPermalink }}">Read more &raquo;</a>
{{ partial "content.html" .Content | truncate 500 }} <a href="{{ .RelPermalink }}">Read more &raquo;</a>
</article>
<br>
{{ end }}

@ -0,0 +1 @@
{{ replaceRE `\[([^\]]*)\]{([^\}]*)}` `<ruby lang="ja">$1<rp>(</rp><rt>$2</rt><rp>)</rp></ruby>` . | safeHTML }}
Loading…
Cancel
Save