feat(comment): add enable for disqus and gitalk
This commit is contained in:
@@ -209,7 +209,7 @@ enableEmoji = true
|
|||||||
[languages.en.params.comment.disqus]
|
[languages.en.params.comment.disqus]
|
||||||
# Disqus shortname to use Disqus in posts
|
# Disqus shortname to use Disqus in posts
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||||
[languages.en.params.comment.gitalk]
|
[languages.en.params.comment.gitalk]
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
@@ -422,9 +422,9 @@ enableEmoji = true
|
|||||||
enable = true
|
enable = true
|
||||||
# Disqus 评论系统设置 (https://disqus.com/)
|
# Disqus 评论系统设置 (https://disqus.com/)
|
||||||
[languages.zh-cn.params.comment.disqus]
|
[languages.zh-cn.params.comment.disqus]
|
||||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||||
[languages.zh-cn.params.comment.gitalk]
|
[languages.zh-cn.params.comment.gitalk]
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
@@ -637,10 +637,12 @@ enableEmoji = true
|
|||||||
enable = true
|
enable = true
|
||||||
# Disqus Comment Config (https://disqus.com/)
|
# Disqus Comment Config (https://disqus.com/)
|
||||||
[languages.fr.params.comment.disqus]
|
[languages.fr.params.comment.disqus]
|
||||||
|
enable = false
|
||||||
# Disqus shortname to use Disqus in posts
|
# Disqus shortname to use Disqus in posts
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||||
[languages.fr.params.comment.gitalk]
|
[languages.fr.params.comment.gitalk]
|
||||||
|
enable = false
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
clientId = ""
|
clientId = ""
|
||||||
|
|||||||
@@ -348,10 +348,14 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
enable = true
|
enable = true
|
||||||
# Disqus Comment Config (https://disqus.com/)
|
# Disqus Comment Config (https://disqus.com/)
|
||||||
[params.comment.disqus]
|
[params.comment.disqus]
|
||||||
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
# Disqus shortname to use Disqus in posts
|
# Disqus shortname to use Disqus in posts
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||||
[params.comment.gitalk]
|
[params.comment.gitalk]
|
||||||
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
clientId = ""
|
clientId = ""
|
||||||
|
|||||||
@@ -353,10 +353,14 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
enable = true
|
enable = true
|
||||||
# Disqus Comment Config (https://disqus.com/)
|
# Disqus Comment Config (https://disqus.com/)
|
||||||
[params.comment.disqus]
|
[params.comment.disqus]
|
||||||
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
# Disqus shortname to use Disqus in posts
|
# Disqus shortname to use Disqus in posts
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||||
[params.comment.gitalk]
|
[params.comment.gitalk]
|
||||||
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
clientId = ""
|
clientId = ""
|
||||||
|
|||||||
@@ -350,10 +350,14 @@ hugo
|
|||||||
enable = true
|
enable = true
|
||||||
# Disqus 评论系统设置 (https://disqus.com/)
|
# Disqus 评论系统设置 (https://disqus.com/)
|
||||||
[params.comment.disqus]
|
[params.comment.disqus]
|
||||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
|
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||||
shortname = ""
|
shortname = ""
|
||||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||||
[params.comment.gitalk]
|
[params.comment.gitalk]
|
||||||
|
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||||
|
enable = false
|
||||||
owner = ""
|
owner = ""
|
||||||
repo = ""
|
repo = ""
|
||||||
clientId = ""
|
clientId = ""
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
{{- $CDN := $scratch.Get "CDN" -}}
|
{{- $CDN := $scratch.Get "CDN" -}}
|
||||||
|
|
||||||
{{- /* Disqus Comment System */ -}}
|
{{- /* Disqus Comment System */ -}}
|
||||||
{{- with .Site.Params.comment.disqus.shortname -}}
|
{{- if .Site.Params.comment.disqus.enable -}}
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
{{- $script := printf `<script defer src="https://%s.disqus.com/embed.js"></script>` . -}}
|
{{- $script := printf `<script defer src="https://%s.disqus.com/embed.js"></script>` .Site.Params.comment.disqus.shortname -}}
|
||||||
{{- slice $script | $scratch.Add "scriptCDN" -}}
|
{{- slice $script | $scratch.Add "scriptCDN" -}}
|
||||||
<noscript>
|
<noscript>
|
||||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Gitalk Comment System */ -}}
|
{{- /* Gitalk Comment System */ -}}
|
||||||
{{- if .Site.Params.comment.gitalk.owner -}}
|
{{- if .Site.Params.comment.gitalk.enable -}}
|
||||||
{{- $gitalk := .Site.Params.comment.gitalk -}}
|
{{- $gitalk := .Site.Params.comment.gitalk -}}
|
||||||
<div id="gitalk"></div>
|
<div id="gitalk"></div>
|
||||||
{{- with $CDN.gitalkCSS -}}
|
{{- with $CDN.gitalkCSS -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user