From 0fb25c808b484740d4568f487ca916bb7a6beb03 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 6 Oct 2024 19:17:40 +0200 Subject: [PATCH 1/6] fix: show different subtitle for each i18n variant in exampleSite (#1068) --- exampleSite/hugo.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index ff9ff17..7cda528 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -18,20 +18,23 @@ languages: title: Example Site weight: 1 params: - description: Example description + sidebar: + subtitle: Example description zh-cn: languageName: 中文 title: 演示站点 weight: 2 params: - description: 演示说明 + sidebar: + subtitle: 演示说明 ar: languageName: عربي languagedirection: rtl title: موقع تجريبي weight: 3 params: - description: وصف تجريبي + sidebar: + subtitle: وصف تجريبي services: # Change it to your Disqus shortname before using From 245b0f2810c0e6c8dc9b887139f8e68cd9298efd Mon Sep 17 00:00:00 2001 From: PukNgae Cryolitia Date: Mon, 7 Oct 2024 01:32:13 +0800 Subject: [PATCH 2/6] fix(colorScheme): systemPreferScheme not initialized on start up (#1061) --- assets/ts/colorScheme.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/ts/colorScheme.ts b/assets/ts/colorScheme.ts index 8cb8a20..978e98e 100644 --- a/assets/ts/colorScheme.ts +++ b/assets/ts/colorScheme.ts @@ -8,6 +8,10 @@ class StackColorScheme { constructor(toggleEl: HTMLElement) { this.bindMatchMedia(); this.currentScheme = this.getSavedScheme(); + if (window.matchMedia('(prefers-color-scheme: dark)').matches === true) + this.systemPreferScheme = 'dark' + else + this.systemPreferScheme = 'light'; this.dispatchEvent(document.documentElement.dataset.scheme as colorScheme); From 2a18a92901e2689c23ff340c380a164a88208d78 Mon Sep 17 00:00:00 2001 From: onavas33 <71631187+onavas33@users.noreply.github.com> Date: Sun, 6 Oct 2024 19:33:20 +0200 Subject: [PATCH 3/6] fix(i18n): missing translation for title of categories widget in fr.yaml (#1059) --- i18n/fr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/fr.yaml b/i18n/fr.yaml index c3feb1d..4e6e1f8 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -50,6 +50,9 @@ widget: tagCloud: title: other: Mots clés + categoriesCloud: + title: + other: Catégories search: title: From 8a7fb331634c97dfb7dca5e7a5ee0b877f3eaa19 Mon Sep 17 00:00:00 2001 From: xiaoxiyao Date: Sun, 20 Oct 2024 02:46:27 +0800 Subject: [PATCH 4/6] feat(giscus): use current language as fallback for `lang` param and add `loading` param (#1075) fix: giscus use current lang as default, and add missing `loading` params --- layouts/partials/comments/provider/giscus.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/partials/comments/provider/giscus.html b/layouts/partials/comments/provider/giscus.html index f7f435d..be5e2e8 100644 --- a/layouts/partials/comments/provider/giscus.html +++ b/layouts/partials/comments/provider/giscus.html @@ -11,7 +11,8 @@ data-emit-metadata="{{- default 0 .emitMetadata -}}" data-input-position="{{- default `top` .inputPosition -}}" data-theme="{{- default `light` .lightTheme -}}" - data-lang="{{- default `en` .lang -}}" + data-lang="{{- default $.Language.LanguageCode .lang -}}" + data-loading="{{- .loading -}}" crossorigin="anonymous" async > From 788dd497b3ce50d27be34c304e74dcd92930c8b9 Mon Sep 17 00:00:00 2001 From: xiaoxiyao Date: Sun, 20 Oct 2024 03:14:35 +0800 Subject: [PATCH 5/6] feat: add fingerprints to the JS file URL to utilize HTTP caching (#1076) --- layouts/partials/footer/components/script.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/footer/components/script.html b/layouts/partials/footer/components/script.html index 4cb350c..3dc96cb 100644 --- a/layouts/partials/footer/components/script.html +++ b/layouts/partials/footer/components/script.html @@ -1,12 +1,12 @@ {{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}} {{- $opts := dict "minify" hugo.IsProduction -}} -{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}} +{{- $script := resources.Get "ts/main.ts" | js.Build $opts | fingerprint -}} {{- with resources.Get "ts/custom.ts" -}} {{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}} - {{- $customScript := . | js.Build $opts -}} + {{- $customScript := . | js.Build $opts | fingerprint -}} {{- end -}} \ No newline at end of file From f4eb5d3e99680fb26e7e62fa5a9aace2e5b0a4cf Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 19 Oct 2024 21:32:49 +0000 Subject: [PATCH 6/6] release: 3.28.0 --- layouts/partials/footer/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 511e5eb..a1d4fbd 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -1,4 +1,4 @@ -{{- $ThemeVersion := "3.27.0" -}} +{{- $ThemeVersion := "3.28.0" -}}