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);
diff --git a/exampleSite/config/_default/languages.yaml b/exampleSite/config/_default/languages.yaml
index 2ba2caa..68178f1 100644
--- a/exampleSite/config/_default/languages.yaml
+++ b/exampleSite/config/_default/languages.yaml
@@ -3,12 +3,20 @@ en:
languageName: English
title: Hugo Theme Stack Example Site
weight: 1
+ params:
+ sidebar:
+ subtitle: Example description
zh-cn:
languageName: 中文
title: Hugo 主题 Stack 演示站点
weight: 2
+ params:
+ sidebar:
+ subtitle: 演示说明
ar:
languageName: عربي
languagedirection: rtl
title: موقع تجريبي
weight: 3
+ sidebar:
+ subtitle: وصف تجريبي
diff --git a/i18n/fr.yaml b/i18n/fr.yaml
index ddc6224..2bec051 100644
--- a/i18n/fr.yaml
+++ b/i18n/fr.yaml
@@ -29,6 +29,12 @@ widget:
title: Archives
more: Autres
+ tagCloud:
+ title: Mots clés
+
+ categoriesCloud:
+ title: Catégories
+
search:
title: Rechercher
placeholder: Cherchez un article, une publication, etc.
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
>
diff --git a/layouts/partials/footer/components/script.html b/layouts/partials/footer/components/script.html
index f25dc83..3d585b6 100644
--- a/layouts/partials/footer/components/script.html
+++ b/layouts/partials/footer/components/script.html
@@ -1,10 +1,10 @@
{{- $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