diff options
author | Dillon <dillonzq@outlook.com> | 2022-05-25 20:51:17 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2022-05-25 20:51:17 +0300 |
commit | 61eccb2502064ee628d6e1983af9020ed6d1de57 (patch) | |
tree | 73d3db70df9c07f963b2902f3ea9e3769f5db9e0 /layouts | |
parent | 487a77244226bf301d29a004c3f5601b7e6fafc6 (diff) |
feat(giscus): standardize configuration, support i18n and add lazyLoading config
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/comment.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 526ab9b4..0518c89d 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -126,25 +126,25 @@ </noscript> {{- end -}} - {{- /* Giscus Comment System */ -}} + {{- /* giscus Comment System */ -}} {{- $giscus := $comment.giscus | default dict -}} {{- if $giscus.enable -}} <div id="giscus" class="comment"></div> - {{- $commentConfig = $giscus.lang | default "en" | dict "lang" | dict "giscus" | merge $commentConfig -}} {{- $commentConfig = dict "repo" $giscus.repo | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = dict "repo_id" $giscus.repo_id | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = dict "repoId" $giscus.repoId | dict "giscus" | merge $commentConfig -}} {{- $commentConfig = dict "category" $giscus.category | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = dict "category_id" $giscus.category_id | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = dict "categoryId" $giscus.categoryId | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = $giscus.lang | default (T "valineLang") | dict "lang" | dict "giscus" | merge $commentConfig -}} {{- $commentConfig = $giscus.mapping | default "pathname" | dict "mapping" | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = $giscus.reactions_enabled | default "1" | dict "reactions_enabled" | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = $giscus.emit_metadata | default "0" | dict "emit_metadata" | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = $giscus.input_position | default "bottom" | dict "input_position" | dict "giscus" | merge $commentConfig -}} - {{- $commentConfig = $giscus.crossorigin | default "anonymous" | dict "crossorigin" | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = $giscus.reactionsEnabled | default "1" | dict "reactionsEnabled" | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = $giscus.emitMetadata | default "0" | dict "emitMetadata" | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = $giscus.inputPosition | default "bottom" | dict "inputPosition" | dict "giscus" | merge $commentConfig -}} + {{- $commentConfig = $giscus.lazyLoading | default false | dict "lazyLoading" | dict "giscus" | merge $commentConfig -}} {{- $commentConfig = $giscus.lightTheme | default "github-light" | dict "lightTheme" | dict "giscus" | merge $commentConfig -}} {{- $commentConfig = $giscus.darkTheme | default "github-dark" | dict "darkTheme" | dict "giscus" | merge $commentConfig -}} <noscript> Please enable JavaScript to view the comments powered by <a href="https://giscus.app">Giscus</a>. - </noscript> + </noscript> {{- end -}} </div> {{- end -}} |