From 3665a521e4e80539454bde5a0fa99a70c688dcc2 Mon Sep 17 00:00:00 2001 From: Henk Verlinde Date: Thu, 7 Jul 2022 11:32:11 +0200 Subject: [PATCH] feat: update lang attribute --- config/_default/config.toml | 3 +-- config/_default/languages.toml | 3 +++ config/_default/params.toml | 2 +- layouts/_default/baseof.html | 2 +- layouts/rss.xml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/_default/config.toml b/config/_default/config.toml index b6a1f4e..5de086f 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -5,13 +5,12 @@ disableHugoGeneratorInject = true enableEmoji = true enableGitInfo = false enableRobotsTXT = true -languageCode = "en-US" paginate = 7 rssLimit = 10 # Multilingual defaultContentLanguage = "en" -disableLanguages = ["de", "nl"] +# disableLanguages = ["de", "nl"] # defaultContentLanguageInSubdir = true # add redirects/headers diff --git a/config/_default/languages.toml b/config/_default/languages.toml index 1f0ca3e..ffb15f9 100644 --- a/config/_default/languages.toml +++ b/config/_default/languages.toml @@ -4,6 +4,7 @@ weight = 10 [en.params] languageISO = "EN" + languageTag = "en-US" [de] languageName = "German" @@ -11,6 +12,7 @@ weight = 15 [de.params] languageISO = "DE" + languageTag = "de-DE" [nl] languageName = "Nederlands" @@ -18,6 +20,7 @@ weight = 20 [nl.params] languageISO = "NL" + languageTag = "nl-NL" titleAddition = "Modern documentatie-thema" description = "Doks is een Hugo-thema waarmee je moderne documentatie-websites kunt bouwen die veilig, snel en klaar voor SEO zijn — standaard." titleHome = "Doks thema" diff --git a/config/_default/params.toml b/config/_default/params.toml index 2c2a2ca..394e709 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -101,7 +101,7 @@ lastMod = false breadCrumb = false highLight = true kaTex = false - multilingualMode = false + multilingualMode = true docsVersioning = false fullWidth = false navbarSticky = true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 97d74f6..155ff84 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{ partial "head/head.html" . }} {{ if eq .Kind "home" -}} {{ .Scratch.Set "class" "home" -}} diff --git a/layouts/rss.xml b/layouts/rss.xml index b8f563e..3a5bb13 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -4,7 +4,7 @@ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo -- gohugo.io{{ with .Site.LanguageCode }} + Hugo -- gohugo.io{{ with .Site.Params.languageTag | default "en-US" }} {{.}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.copyRight }}