From 0f15206e780a38f4ebc6d41f581e508387d5c64f Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 20 Oct 2021 09:31:28 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Add=20extra=20variables=20to=20f?= =?UTF-8?q?ooter=20for=20better=20i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/en.yaml | 2 +- i18n/zh.yaml | 2 +- layouts/partials/footer.html | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 6052261f..b3ae90f9 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -16,7 +16,7 @@ error: 404_description: "It seems that the page you've requested does not exist." footer: - powered_by: "Powered by {{ .Hugo }}" + powered_by: "Powered by {{ .Hugo }} & {{ .Congo }}" list: externalurl_title: "Link to external site" diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 4d48f9b5..8237c110 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -15,7 +15,7 @@ error: 404_description: "您请求的页面似乎不存在。" footer: - powered_by: "由 {{ .Hugo }} 强力驱动" + powered_by: "由 {{ .Hugo }} & {{ .Congo }} 强力驱动" list: externalurl_title: "链接到外部网站" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index dc97fc34..d3654e09 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -30,13 +30,10 @@ {{ if .Site.Params.attribution | default true }}
{{ $hugo := printf `Hugo - & - Congo` + href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo` }} - - {{ i18n "footer.powered_by" (dict "Hugo" $hugo) | safeHTML }} + {{ $congo := printf `Congo` }} + {{ i18n "footer.powered_by" (dict "Hugo" $hugo "Congo" $congo) | safeHTML }}
{{ end }} {{/* Extend footer - eg. for extra scripts, etc. */}}