From e2c122bd5d738261a14e05648ee261f816b342b7909a9bfc873be8c8db3e1d98 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Mon, 31 Jul 2023 00:00:00 +0000 Subject: Add multilingual support for taxonomies --- layouts/partials/pageinfo.html | 2 +- layouts/taxonomy/taxonomy.gmi | 6 +++--- layouts/taxonomy/taxonomy.html | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html index 42d2e90..ef64ef1 100644 --- a/layouts/partials/pageinfo.html +++ b/layouts/partials/pageinfo.html @@ -1,2 +1,2 @@ {{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}} -{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ if .Page.Params.Tags }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := .Page.Params.Tags }}{{ if $key }}, {{ end }}{{ $val }}{{ end }} +{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}{{ $val }}{{ end }} diff --git a/layouts/taxonomy/taxonomy.gmi b/layouts/taxonomy/taxonomy.gmi index 99fb8f9..ecca4d8 100644 --- a/layouts/taxonomy/taxonomy.gmi +++ b/layouts/taxonomy/taxonomy.gmi @@ -3,10 +3,10 @@ # {{ .Type | humanize }} -## Feeds -=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} Atom Feed +## {{ i18n "feeds" }} +=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }} -## List +## {{ i18n "list" }} {{- range .Data.Pages }} => {{ .RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ .Title | safeHTML }} {{- end }} diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html index 45d64da..f1b5460 100644 --- a/layouts/taxonomy/taxonomy.html +++ b/layouts/taxonomy/taxonomy.html @@ -4,9 +4,9 @@

{{ .Type | humanize }}

-

Feeds

-

{{ emojify ":link:" | safeHTML }} Atom Feed

-

List

+

{{ i18n "feeds" }}

+

{{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }}

+

{{ i18n "list" }}