mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-08 22:49:44 +00:00
parent
cd7f705800
commit
d8a7dab116
2 changed files with 40 additions and 0 deletions
|
@ -142,6 +142,19 @@ copyright = "" # default: author.name ↓ # 默认为下面配
|
|||
clientId = "" # Your client ID
|
||||
clientSecret = "" # Your client secret
|
||||
|
||||
# Valine.
|
||||
# You can get your appid and appkey from https://leancloud.cn
|
||||
# more info please open https://valine.js.org
|
||||
[params.valine]
|
||||
enable = false
|
||||
appId = '你的appId'
|
||||
appKey = '你的appKey'
|
||||
notify = false # mail notifier , https://github.com/xCss/Valine/wiki
|
||||
verify = false # Verification code
|
||||
avatar = 'mm'
|
||||
placeholder = '说点什么吧...'
|
||||
visitor = false
|
||||
|
||||
[params.flowchartDiagrams]# see https://blog.olowolo.com/example-site/post/js-flowchart-diagrams/
|
||||
enable = false
|
||||
options = ""
|
||||
|
|
|
@ -96,4 +96,31 @@
|
|||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
|
||||
{{- end }}
|
||||
|
||||
<!-- valine -->
|
||||
{{- if .Site.Params.valine.enable -}}
|
||||
<!-- id 将作为查询条件 -->
|
||||
{{- if .Site.Params.valine.visitor -}}
|
||||
<span id="{{ .URL | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
|
||||
<span class="post-meta-item-text">文章阅读量 </span>
|
||||
<span class="leancloud-visitors-count">0</span>
|
||||
<p></p>
|
||||
</span>
|
||||
{{- end }}
|
||||
<div id="vcomments"></div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: '#vcomments' ,
|
||||
appId: '{{ .Site.Params.valine.appId }}',
|
||||
appKey: '{{ .Site.Params.valine.appKey }}',
|
||||
notify: {{ .Site.Params.valine.notify }},
|
||||
verify: {{ .Site.Params.valine.verify }},
|
||||
avatar:'{{ .Site.Params.valine.avatar }}',
|
||||
placeholder: '{{ .Site.Params.valine.placeholder }}',
|
||||
visitor: {{ .Site.Params.valine.visitor }}
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue