🌐 Add better i18n support for article metadata

This commit is contained in:
James Panther
2022-01-24 13:58:19 +11:00
parent 61d80cf13d
commit b59137e458
13 changed files with 22 additions and 14 deletions
+1
View File
@@ -0,0 +1 @@
{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }}
+3 -2
View File
@@ -1,3 +1,4 @@
{{- i18n "article.updated" -}}: 
{{ partial "meta/date.html" . }}
<time datetime="{{ . }}">
{{- i18n "article.date_updated" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
</time>
{{- /* Trim EOF */ -}}
+1 -1
View File
@@ -1,4 +1,4 @@
<time datetime="{{ . }}">
{{- . | time.Format (site.Language.Params.dateFormat | default ":date_long") -}}
{{- i18n "article.date" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
</time>
{{- /* Trim EOF */ -}}
+1 -1
View File
@@ -1,4 +1,4 @@
<span title="{{ i18n "article.reading_time_title" }}">
{{- i18n "article.reading_time" .ReadingTime | emojify -}}
{{- i18n "article.reading_time" .ReadingTime | markdownify | emojify -}}
</span>
{{- /* Trim EOF */ -}}
+1 -2
View File
@@ -1,5 +1,4 @@
<span>
{{- i18n "article.word_count" .WordCount | emojify -}}
{{- i18n "article.word_count" .WordCount | markdownify | emojify -}}
</span>
{{- /* Trim EOF */ -}}