Add i18n support to the theme

This commit is contained in:
2023-01-01 01:28:18 -08:00
parent f56465c5ec
commit 98ee4bd8f3
9 changed files with 73 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
<li>
<a href="{{ .Permalink }}" class="post-title">{{ if .Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .Title }}</a>
<p class="post-wordcount">{{ .WordCount }} words, about {{ .ReadingTime }} minutes to read.</p>
<p class="post-preview">{{ .Summary }} . . .</p>
<p class="post-wordcount">{{ i18n "nWords" .WordCount }}, {{ i18n "nMinutesToRead" .ReadingTime }}.</p>
<p class="post-preview">{{ .Summary }} {{ if .Truncated }}. . .{{ end }}</p>
</li>