Add support for furigana in titles

main
Elnu 2 years ago
parent dd2de6b9a9
commit f68baa1539

@ -17,7 +17,7 @@
{{ end }} {{ end }}
<article> <article>
<header> <header>
<h1>{{ .Title }}</h1> <h1>{{ partial "content.html" .Title }}</h1>
{{ partial "metadata.html" . }} {{ partial "metadata.html" . }}
</header> </header>
<br> <br>

@ -1,7 +1,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <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:site_name" content="{{ .Site.Title }}">
<meta property="og:title" content="{{ $title }}"> <meta property="og:title" content="{{ $title }}">
<meta name="twitter:title" content="{{ $title }}"> <meta name="twitter:title" content="{{ $title }}">

@ -0,0 +1 @@
{{ replaceRE `\[([^\]]*)\]{([^\}]*)}` "" . | safeHTML }}