Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2022-05-25 21:11:33 +0300
committerGitHub <noreply@github.com>2022-05-25 21:11:33 +0300
commitc87b6a5108324e42c3bcf59e1e48191aa72a62a8 (patch)
tree79cbee1e32ecfcc4ab96983867bdd44b1c74919a /layouts
parent07069b3d77aff50c96ff71a8750fbb1f8f709589 (diff)
parentea043a2674faa7e2b310e66bf9ae8e4b98be5859 (diff)
Merge pull request #664 from xwi88/support-giscus
feat(giscus): the most powerful comment plugin
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/comment.html25
1 files changed, 23 insertions, 2 deletions
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index f849740d..2a52864e 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -112,7 +112,7 @@
</noscript>
{{- end -}}
- {{- /* Utterances Comment System */ -}}
+ {{- /* utterances Comment System */ -}}
{{- $utterances := $comment.utterances | default dict -}}
{{- if $utterances.enable -}}
<div id="utterances" class="comment"></div>
@@ -122,7 +122,28 @@
{{- $commentConfig = $utterances.lightTheme | default "github-light" | dict "lightTheme" | dict "utterances" | merge $commentConfig -}}
{{- $commentConfig = $utterances.darkTheme | default "github-dark" | dict "darkTheme" | dict "utterances" | merge $commentConfig -}}
<noscript>
- Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>.
+ Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">utterances</a>.
+ </noscript>
+ {{- end -}}
+
+ {{- /* giscus Comment System */ -}}
+ {{- $giscus := $comment.giscus | default dict -}}
+ {{- if $giscus.enable -}}
+ <div id="giscus" class="comment"></div>
+ {{- $commentConfig = dict "repo" $giscus.repo | dict "giscus" | merge $commentConfig -}}
+ {{- $commentConfig = dict "repoId" $giscus.repoId | dict "giscus" | merge $commentConfig -}}
+ {{- $commentConfig = dict "category" $giscus.category | 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.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>
{{- end -}}
</div>