🚨 Support new language params changes in Hugo

This commit is contained in:
James Panther
2023-05-25 14:12:42 +10:00
parent aba3d34482
commit 50c5d212de
8 changed files with 27 additions and 23 deletions
+1 -1
View File
@@ -1 +1 @@
{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }}
{{ return time.Format (site.Params.dateFormat | default ":date_long") . }}
+1 -1
View File
@@ -1,6 +1,6 @@
<head>
<meta charset="utf-8" />
{{ with .Site.Language.Params.htmlCode | default .Site.LanguageCode }}
{{ with site.Params.htmlCode | default .Site.LanguageCode }}
<meta http-equiv="content-language" content="{{ . }}" />
{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+2 -2
View File
@@ -1,11 +1,11 @@
{{ if .IsTranslated }}
<ul class="flex flex-row list-none">
<ul class="flex list-none flex-row">
{{ range .AllTranslations }}
<li class="ml-2">
<a
href="{{ .RelPermalink }}"
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
>{{ .Language.Params.displayName | emojify }}</a
>{{ site.Params.displayName | emojify }}</a
>
</li>
{{ end }}