diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..ebe4b34 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2025-02-23 - Language Switcher Accessibility +**Learning:** For multilingual support and accessibility, language switcher links must include `hreflang` and `lang` attributes matching the target language code to ensure proper screen reader pronunciation profiles are applied. +**Action:** Add these attributes to the translations component. diff --git a/apps/gzen-invest/hugo.toml b/apps/gzen-invest/hugo.toml index 4aa734e..b6995ca 100644 --- a/apps/gzen-invest/hugo.toml +++ b/apps/gzen-invest/hugo.toml @@ -1,5 +1,5 @@ baseURL = "https://invest.gzen.dev/" -languageCode = "en-us" +locale = "en" title = "invest.gzen" enableRobotsTXT = true diff --git a/apps/gzen-ki/.github/copilot-instructions.md b/apps/gzen-ki/.github/copilot-instructions.md index 26ee9ec..e9f6feb 100644 --- a/apps/gzen-ki/.github/copilot-instructions.md +++ b/apps/gzen-ki/.github/copilot-instructions.md @@ -18,7 +18,7 @@ Deployed via **Cloudflare Pages** (not GitHub Actions). ```html -{{ range .Site.Data.herbs }} +{{ range site.Data.herbs }} {{ .name_zh }} — {{ .pinyin }} {{ end }} diff --git a/apps/gzen-ki/config/_default/hugo.toml b/apps/gzen-ki/config/_default/hugo.toml index e8f279c..0ac04ee 100644 --- a/apps/gzen-ki/config/_default/hugo.toml +++ b/apps/gzen-ki/config/_default/hugo.toml @@ -1,5 +1,5 @@ baseURL = "https://genki.gzen.io/" -languageCode = "zh-CN" +locale = "zh-CN" defaultContentLanguage = "zh-cn" title = "元気・健康笔记" theme = "blowfish" diff --git a/apps/gzen-ki/config/_default/languages.zh-cn.toml b/apps/gzen-ki/config/_default/languages.zh-cn.toml index ada6f62..012e66b 100644 --- a/apps/gzen-ki/config/_default/languages.zh-cn.toml +++ b/apps/gzen-ki/config/_default/languages.zh-cn.toml @@ -1,6 +1,6 @@ disabled = false -languageCode = "zh-CN" -languageName = "中文" +locale = "zh-CN" +label = "中文" weight = 1 title = "元気・健康笔记" diff --git a/apps/gzen-ki/layouts/gallery/list.html b/apps/gzen-ki/layouts/gallery/list.html index ef05ed7..3cb58d7 100644 --- a/apps/gzen-ki/layouts/gallery/list.html +++ b/apps/gzen-ki/layouts/gallery/list.html @@ -1,5 +1,5 @@ {{/* Gallery list — Herb Gallery with filter bar - Reads from .Site.Data.herbs (data/herbs.yaml) + Reads from site.Data.herbs (data/herbs.yaml) Uses Blowfish base template via {{ define "main" }} */}} {{ define "main" }} @@ -32,7 +32,7 @@

{{ . {{/* Herb grid */}} - diff --git a/apps/gzen/themes/blowfish/config/_default/languages.en.toml b/apps/gzen/themes/blowfish/config/_default/languages.en.toml index e3abc85..81e84ca 100644 --- a/apps/gzen/themes/blowfish/config/_default/languages.en.toml +++ b/apps/gzen/themes/blowfish/config/_default/languages.en.toml @@ -1,6 +1,6 @@ disabled = false -languageCode = "en" -languageName = "English" +locale = "en" +label = "English" weight = 1 title = "Blowfish" diff --git a/apps/gzen/themes/blowfish/layouts/_default/single.html b/apps/gzen/themes/blowfish/layouts/_default/single.html index 0967c49..d1c2719 100644 --- a/apps/gzen/themes/blowfish/layouts/_default/single.html +++ b/apps/gzen/themes/blowfish/layouts/_default/single.html @@ -97,7 +97,7 @@

{{ end }} {{ define "SingleAuthor" }} - {{ $authorsData := .Site.Data.authors }} + {{ $authorsData := site.Data.authors }} {{ $taxonomies := site.Taxonomies.authors }} {{ $baseURL := site.BaseURL }} {{ $taxonomyLink := 0 }} diff --git a/apps/gzen/themes/blowfish/layouts/partials/contributors.html b/apps/gzen/themes/blowfish/layouts/partials/contributors.html index 9de90f9..ff6f3e9 100644 --- a/apps/gzen/themes/blowfish/layouts/partials/contributors.html +++ b/apps/gzen/themes/blowfish/layouts/partials/contributors.html @@ -1,4 +1,4 @@ -{{ with .Site.Data.contributors }} +{{ with site.Data.contributors }}
diff --git a/apps/gzen/themes/blowfish/layouts/partials/sharing-links.html b/apps/gzen/themes/blowfish/layouts/partials/sharing-links.html index e7c212e..5bda5ce 100644 --- a/apps/gzen/themes/blowfish/layouts/partials/sharing-links.html +++ b/apps/gzen/themes/blowfish/layouts/partials/sharing-links.html @@ -1,5 +1,5 @@ {{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }} - {{ $links := .Site.Data.sharing }} + {{ $links := site.Data.sharing }}
{{ range . }} {{ with index $links . }} diff --git a/apps/gzen/themes/blowfish/layouts/partials/sponsors.html b/apps/gzen/themes/blowfish/layouts/partials/sponsors.html index b5e808a..d811486 100644 --- a/apps/gzen/themes/blowfish/layouts/partials/sponsors.html +++ b/apps/gzen/themes/blowfish/layouts/partials/sponsors.html @@ -1,4 +1,4 @@ -{{ with .Site.Data.sponsors }} +{{ with site.Data.sponsors }}
diff --git a/apps/gzen/themes/blowfish/layouts/partials/vendor.html b/apps/gzen/themes/blowfish/layouts/partials/vendor.html index a03100c..ba685c1 100644 --- a/apps/gzen/themes/blowfish/layouts/partials/vendor.html +++ b/apps/gzen/themes/blowfish/layouts/partials/vendor.html @@ -124,7 +124,7 @@ {{ end }} {{ if $hasRepoCards }} - {{ $repoColors := .Site.Data.repoColors }} + {{ $repoColors := site.Data.repoColors }} {{ $cssRules := slice }} {{/* default color */}} diff --git a/apps/gzen/themes/blowfish/layouts/shortcodes/codeberg.html b/apps/gzen/themes/blowfish/layouts/shortcodes/codeberg.html index bb1921e..eb6d108 100644 --- a/apps/gzen/themes/blowfish/layouts/shortcodes/codeberg.html +++ b/apps/gzen/themes/blowfish/layouts/shortcodes/codeberg.html @@ -1,6 +1,6 @@ {{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }} {{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}} -{{- $repoColors := .Site.Data.repoColors -}} +{{- $repoColors := site.Data.repoColors -}} {{- $codebergData := dict -}} {{- with try (resources.GetRemote $codebergURL) -}} {{- with .Err -}} diff --git a/apps/gzen/themes/blowfish/layouts/shortcodes/forgejo.html b/apps/gzen/themes/blowfish/layouts/shortcodes/forgejo.html index 43b9f0e..7627766 100644 --- a/apps/gzen/themes/blowfish/layouts/shortcodes/forgejo.html +++ b/apps/gzen/themes/blowfish/layouts/shortcodes/forgejo.html @@ -1,6 +1,6 @@ {{ $id := delimit (slice "forgejo" (partial "functions/uid.html" .)) "-" }} {{- $forgejoURL := print (.Get "server" | default .Site.Params.forgejoDefaultServer) "/api/v1/repos/" (.Get "repo") -}} -{{- $repoColors := .Site.Data.repoColors -}} +{{- $repoColors := site.Data.repoColors -}} {{- $forgejoData := dict -}} {{- with try (resources.GetRemote $forgejoURL) -}} {{- with .Err -}} diff --git a/apps/gzen/themes/blowfish/layouts/shortcodes/gitea.html b/apps/gzen/themes/blowfish/layouts/shortcodes/gitea.html index e378239..4805080 100644 --- a/apps/gzen/themes/blowfish/layouts/shortcodes/gitea.html +++ b/apps/gzen/themes/blowfish/layouts/shortcodes/gitea.html @@ -1,6 +1,6 @@ {{ $id := delimit (slice "gitea" (partial "functions/uid.html" .)) "-" }} {{- $giteaURL := print (.Get "server" | default .Site.Params.giteaDefaultServer) "/api/v1/repos/" (.Get "repo") -}} -{{- $repoColors := .Site.Data.repoColors -}} +{{- $repoColors := site.Data.repoColors -}} {{- $giteaData := dict -}} {{- with try (resources.GetRemote $giteaURL) -}} {{- with .Err -}} diff --git a/apps/gzen/themes/blowfish/layouts/shortcodes/github.html b/apps/gzen/themes/blowfish/layouts/shortcodes/github.html index a8438f5..9a5fb43 100644 --- a/apps/gzen/themes/blowfish/layouts/shortcodes/github.html +++ b/apps/gzen/themes/blowfish/layouts/shortcodes/github.html @@ -2,7 +2,7 @@ {{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}} {{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}} {{- $showThumbnail := .Get "showThumbnail" | default true -}} -{{- $repoColors := .Site.Data.repoColors -}} +{{- $repoColors := site.Data.repoColors -}} {{- $githubData := dict -}} {{- with try (resources.GetRemote $githubURL) -}} {{- with .Err -}}