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

github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaohuabing <zhaohuabing@gmail.com>2022-07-05 09:23:27 +0300
committerzhaohuabing <zhaohuabing@gmail.com>2022-07-05 09:23:27 +0300
commit30629810f6795b83d3448b7675fb7794dbc3e597 (patch)
treeb8f7ca7e7d5ace1d042e9f2f88948376d2db03b5
parent9d05ea6203ced0eedadb8f2d34c16ecbfde49f07 (diff)
support two comment systems at the same time
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
-rw-r--r--layouts/partials/comments.html32
1 files changed, 17 insertions, 15 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index fb8a366..d2500d8 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -1,18 +1,5 @@
-{{ if .Site.Params.giscus }}
-<script src="https://giscus.app/client.js"
- data-repo="{{ .Site.Params.giscus.data_repo}}"
- data-repo-id="{{ .Site.Params.giscus.data_repo_id}}"
- data-category="{{ .Site.Params.giscus.data_category}}"
- data-category-id="{{ .Site.Params.giscus.data_category_id}}"
- data-mapping="{{ .Site.Params.giscus.data_mapping}}"
- data-reactions-enabled="{{ .Site.Params.giscus.data_reactions_enabled}}"
- data-emit-metadata="{{ .Site.Params.giscus.data_emit_metadata}}"
- data-theme="{{ .Site.Params.giscus.data_theme}}"
- data-lang="{{ .Site.Params.giscus.data_lang}}"
- crossorigin="{{ .Site.Params.giscus.crossorigin}}"
- async>
-</script>
-{{ else if .Site.Params.disqus_proxy }}
+
+{{ if .Site.Params.disqus_proxy }}
<!-- disqus 评论框 end -->
<div id="disqus-comment"></div>
<script src="{{ "js/iDisqus.js" | relURL }}"></script>
@@ -41,3 +28,18 @@ var disq = new iDisqus('disqus-comment', {
})
</script>
{{ end }}
+{{ if .Site.Params.giscus }}
+<script src="https://giscus.app/client.js"
+ data-repo="{{ .Site.Params.giscus.data_repo}}"
+ data-repo-id="{{ .Site.Params.giscus.data_repo_id}}"
+ data-category="{{ .Site.Params.giscus.data_category}}"
+ data-category-id="{{ .Site.Params.giscus.data_category_id}}"
+ data-mapping="{{ .Site.Params.giscus.data_mapping}}"
+ data-reactions-enabled="{{ .Site.Params.giscus.data_reactions_enabled}}"
+ data-emit-metadata="{{ .Site.Params.giscus.data_emit_metadata}}"
+ data-theme="{{ .Site.Params.giscus.data_theme}}"
+ data-lang="{{ .Site.Params.giscus.data_lang}}"
+ crossorigin="{{ .Site.Params.giscus.crossorigin}}"
+ async>
+</script>
+{{ end }}