Skip to content

Commit

Permalink
fix: giscus use current lang as default,and add missing loading params
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiyao committed Oct 12, 2024
1 parent 2a18a92 commit ef769af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion layouts/partials/comments/provider/giscus.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{ $lang := .Language.LanguageCode }}
{{ if not $lang }}
{{ $lang = .Language.Lang }}
{{ end }}
{{- with .Site.Params.comments.giscus -}}
<script
src="https://giscus.app/client.js"
Expand All @@ -11,7 +15,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 $lang .lang -}}"
data-loading="{{- .loading -}}"
crossorigin="anonymous"
async
></script>
Expand Down

0 comments on commit ef769af

Please sign in to comment.