From be38f8fb7725828bc5c21906b6c0a72bd8403af46eb36f4c78278afe229d8434 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Mon, 31 Jul 2023 00:00:00 +0000 Subject: Add multilingual support for homepage link --- layouts/_default/single.gmi | 2 +- layouts/_default/single.html | 2 +- layouts/taxonomy/taxonomy.gmi | 2 +- layouts/taxonomy/taxonomy.html | 2 +- layouts/term/term.gmi | 2 +- layouts/term/term.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index d038c3d..1e56f7f 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -1,6 +1,6 @@ {{ define "main" }} {{ $emoji := cond (.Page.Params.showlinkemoji | default true) (emojify ":link: ") "" -}} -=> / {{ emojify ":link:" | safeHTML }} Return to homepage +=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" }} {{ if (.Page.Params.pageinfo | default true) }}{{ partial "pageinfo.gmi" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d0cc6a3..ec0ccbb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" -}} {{- if (.Page.Params.pageinfo | default true) }}

{{ partial "pageinfo.html" . }}

{{ end }} diff --git a/layouts/taxonomy/taxonomy.gmi b/layouts/taxonomy/taxonomy.gmi index 56b53a9..99fb8f9 100644 --- a/layouts/taxonomy/taxonomy.gmi +++ b/layouts/taxonomy/taxonomy.gmi @@ -1,5 +1,5 @@ {{ define "main" -}} -=> / {{ emojify ":link:" | safeHTML }} Return to homepage +=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" }} # {{ .Type | humanize }} diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html index a3a22a7..45d64da 100644 --- a/layouts/taxonomy/taxonomy.html +++ b/layouts/taxonomy/taxonomy.html @@ -1,6 +1,6 @@ {{ define "main" -}}

{{ .Type | humanize }}

diff --git a/layouts/term/term.gmi b/layouts/term/term.gmi index d4c0d7d..e58960b 100644 --- a/layouts/term/term.gmi +++ b/layouts/term/term.gmi @@ -1,5 +1,5 @@ {{ define "main" -}} -=> / {{ emojify ":link:" | safeHTML }} Return to homepage +=> {{ .Site.Home.RelPermalink | replaceRE `(?m)index.gmi$` "" }} {{ emojify ":link:" | safeHTML }} {{ i18n "returnHome" }} # {{ .Type | singularize | humanize | safeHTML }} "{{ .Title | safeHTML }}" diff --git a/layouts/term/term.html b/layouts/term/term.html index 4b69ebe..93f537d 100644 --- a/layouts/term/term.html +++ b/layouts/term/term.html @@ -1,6 +1,6 @@ {{ define "main" -}}

{{ .Type | singularize | humanize }} "{{ .Title }}"

-- cgit v1.2.3