Add support for furigana in titles
This commit is contained in:
parent
dd2de6b9a9
commit
f68baa1539
3 changed files with 3 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
{{ end }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h1>{{ partial "content.html" .Title }}</h1>
|
||||
{{ partial "metadata.html" . }}
|
||||
</header>
|
||||
<br>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ $title := cond .IsHome .Site.Title (printf "%s" .Title | printf "%s%s" (cond (and (eq .Kind "term") (eq .Data.Singular "tag")) "#" "") | printf "%s") }}
|
||||
{{ $title := cond .IsHome .Site.Title (printf "%s" (partial "kanji.html" .Title) | printf "%s%s" (cond (and (eq .Kind "term") (eq .Data.Singular "tag")) "#" "") | printf "%s") }}
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
|
|
1
layouts/partials/kanji.html
Normal file
1
layouts/partials/kanji.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{ replaceRE `\[([^\]]*)\]{([^\}]*)}` "" . | safeHTML }}
|
Loading…
Add table
Reference in a new issue