mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-01-25 01:24:57 +01:00
Merge pull request #132 from dillonzq/feature/comment
feat(comment): add enable for disqus and gitalk
This commit is contained in:
commit
e864ace0a5
9 changed files with 46 additions and 28 deletions
|
@ -11,6 +11,6 @@ mermaid@8.4.8 https://github.com/knsv/mermaid
|
|||
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
meting@2.0.1 https://github.com/metowolf/MetingJS
|
||||
echarts@4.6.0 https://echarts.apache.org/
|
||||
gitalk@1.6.0 https://github.com/gitalk/gitalk
|
||||
gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
valine@1.3.10 https://valine.js.org/
|
||||
iconfont https://www.iconfont.cn/
|
||||
|
|
6
assets/lib/gitalk/gitalk.min.js
vendored
6
assets/lib/gitalk/gitalk.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -209,7 +209,7 @@ enableEmoji = true
|
|||
[languages.en.params.comment.disqus]
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = ""
|
||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[languages.en.params.comment.gitalk]
|
||||
owner = ""
|
||||
repo = ""
|
||||
|
@ -217,9 +217,9 @@ enableEmoji = true
|
|||
clientSecret = ""
|
||||
# Valine Comment Config (https://github.com/xCss/Valine)
|
||||
[languages.en.params.comment.valine]
|
||||
enable = false
|
||||
appId = ""
|
||||
appKey = ""
|
||||
enable = true
|
||||
appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
|
||||
appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
|
||||
placeholder = "Your comment ..."
|
||||
notify = false
|
||||
verify = true
|
||||
|
@ -422,9 +422,9 @@ enableEmoji = true
|
|||
enable = true
|
||||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[languages.zh-cn.params.comment.disqus]
|
||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
||||
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||
shortname = ""
|
||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[languages.zh-cn.params.comment.gitalk]
|
||||
owner = ""
|
||||
repo = ""
|
||||
|
@ -432,9 +432,9 @@ enableEmoji = true
|
|||
clientSecret = ""
|
||||
# Valine 评论系统设置 (https://github.com/xCss/Valine)
|
||||
[languages.zh-cn.params.comment.valine]
|
||||
enable = false
|
||||
appId = ""
|
||||
appKey = ""
|
||||
enable = true
|
||||
appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
|
||||
appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
|
||||
placeholder = "你的评论 ..."
|
||||
notify = false
|
||||
verify = true
|
||||
|
@ -637,19 +637,21 @@ enableEmoji = true
|
|||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[languages.fr.params.comment.disqus]
|
||||
enable = false
|
||||
# Disqus shortname to use Disqus in posts
|
||||
shortname = ""
|
||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[languages.fr.params.comment.gitalk]
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
clientSecret = ""
|
||||
# Valine Comment Config (https://github.com/xCss/Valine)
|
||||
[languages.fr.params.comment.valine]
|
||||
enable = false
|
||||
appId = ""
|
||||
appKey = ""
|
||||
enable = true
|
||||
appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
|
||||
appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
|
||||
placeholder = "Votre commentaire ..."
|
||||
notify = false
|
||||
verify = true
|
||||
|
@ -790,7 +792,7 @@ enableEmoji = true
|
|||
# echarts@4.6.0 https://echarts.apache.org/
|
||||
echartsJS = ''
|
||||
echartsMacaronsJS = ''
|
||||
# gitalk@1.6.0 https://github.com/gitalk/gitalk
|
||||
# gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
gitalkCSS = ''
|
||||
gitalkJS = ''
|
||||
# valine@1.3.10 https://valine.js.org/
|
||||
|
|
|
@ -348,10 +348,14 @@ Note that some of these parameters are explained in details in other sections of
|
|||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[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
|
||||
shortname = ""
|
||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
|
@ -438,7 +442,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
# echarts@4.6.0 https://echarts.apache.org/
|
||||
echartsJS = ''
|
||||
echartsMacaronsJS = ''
|
||||
# gitalk@1.6.0 https://github.com/gitalk/gitalk
|
||||
# gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
gitalkCSS = ''
|
||||
gitalkJS = ''
|
||||
# valine@1.3.10 https://valine.js.org/
|
||||
|
|
|
@ -353,10 +353,14 @@ Note that some of these parameters are explained in details in other sections of
|
|||
enable = true
|
||||
# Disqus Comment Config (https://disqus.com/)
|
||||
[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
|
||||
shortname = ""
|
||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
# Gitalk Comment Config (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
|
@ -443,7 +447,7 @@ Note that some of these parameters are explained in details in other sections of
|
|||
# echarts@4.6.0 https://echarts.apache.org/
|
||||
echartsJS = ''
|
||||
echartsMacaronsJS = ''
|
||||
# gitalk@1.6.0 https://github.com/gitalk/gitalk
|
||||
# gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
gitalkCSS = ''
|
||||
gitalkJS = ''
|
||||
# valine@1.3.10 https://valine.js.org/
|
||||
|
|
|
@ -350,10 +350,14 @@ hugo
|
|||
enable = true
|
||||
# Disqus 评论系统设置 (https://disqus.com/)
|
||||
[params.comment.disqus]
|
||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||
enable = false
|
||||
# Disqus 的 shortname,用来在文章中启用 Disqus 评论系统
|
||||
shortname = ""
|
||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
# Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||
[params.comment.gitalk]
|
||||
# LoveIt :(fas fa-greater-than-equal): :(far fa-file-archive): v0.1.1
|
||||
enable = false
|
||||
owner = ""
|
||||
repo = ""
|
||||
clientId = ""
|
||||
|
@ -440,7 +444,7 @@ hugo
|
|||
# echarts@4.6.0 https://echarts.apache.org/
|
||||
echartsJS = ''
|
||||
echartsMacaronsJS = ''
|
||||
# gitalk@1.6.0 https://github.com/gitalk/gitalk
|
||||
# gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
gitalkCSS = ''
|
||||
gitalkJS = ''
|
||||
# valine@1.3.10 https://valine.js.org/
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
{{- $CDN := $scratch.Get "CDN" -}}
|
||||
|
||||
{{- /* Disqus Comment System */ -}}
|
||||
{{- with .Site.Params.comment.disqus.shortname -}}
|
||||
{{- if .Site.Params.comment.disqus.enable -}}
|
||||
<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" -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
||||
|
@ -14,7 +14,7 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- /* Gitalk Comment System */ -}}
|
||||
{{- if .Site.Params.comment.gitalk.owner -}}
|
||||
{{- if .Site.Params.comment.gitalk.enable -}}
|
||||
{{- $gitalk := .Site.Params.comment.gitalk -}}
|
||||
<div id="gitalk"></div>
|
||||
{{- with $CDN.gitalkCSS -}}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.v code,.v pre{text-align:left}
|
||||
|
||||
/*# sourceMappingURL=dark.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"Target":"lib/valine/dark.css","MediaType":"text/css","Data":{}}
|
Loading…
Add table
Reference in a new issue