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

github.com/Fastbyte01/KeepIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Pignataro <rogepix@gmail.com>2019-11-11 19:53:43 +0300
committerGitHub <noreply@github.com>2019-11-11 19:53:43 +0300
commit751b86899b7d77434ae0ec88983f29c42fa8bddd (patch)
treec3832bfe7810dfedfeb4150e211022f83eb61a6f
parent0524186ab255843de519d425ef1ad81a2aa2caa4 (diff)
parent7a8aa4d6d2f4fa25e725415f78862bf03c88d1c7 (diff)
Merge pull request #42 from BlankerL/master
Update of Valine comments
-rw-r--r--exampleSite/config.toml14
-rw-r--r--layouts/partials/comments.html22
2 files changed, 19 insertions, 17 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 8eaa503..65130c6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -51,10 +51,10 @@ disqusShortname = "yourdiscussshortname"
yandex_verification = ""
pinterest_verification = ""
baidu_verification = ""
-
+
avatar = "/images/me/avatar.jpg" #comment it to use gravatar
socialShare = true
-
+
description = "" # site description
keywords = "" # site keywords
@@ -136,7 +136,7 @@ Linkedin = true
#Douban = true
#Weibo = true
-# Used only for Seo schema
+# Used only for Seo schema
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
[author]
@@ -161,13 +161,14 @@ copyright = "This work is licensed under a Creative Commons Attribution-NonComme
height = 600
[params.gitalk]
-owner = "" # Your GitHub ID
-repo = "" # The repo to store comments
-clientId = "" # Your client ID
+owner = "" # Your GitHub ID
+repo = "" # The repo to store comments
+clientId = "" # Your client ID
clientSecret = "" # Your client secret
[params.valine]
enable = false
+ language = 'en'
appId = 'your appId'
appKey = 'your appKey'
notify = false # mail notifier , https://github.com/xCss/Valine/wiki
@@ -185,4 +186,3 @@ clientSecret = "" # Your client secret
repo = "" # The repo to store comments
clientId = "" # Your client ID
clientSecret = "" # Your client secret
-
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index e720f46..af0a889 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -41,24 +41,27 @@
<!-- valine -->
{{- if .Site.Params.valine.enable -}}
+ {{- if .Site.Params.valine.visitor -}}
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
- <span class="post-meta-item-text"> pm </span>
- <span class="leancloud-visitors-count">1000000</span>
+ <span class="post-meta-item-text"> Visitors: </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 }}',
+ lang: {{ .Site.Params.valine.language }},
+ 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 -}}
@@ -97,4 +100,3 @@
<noscript>Please enable JavaScript to view the <a href="https://github.com/imsun/gitment">comments powered by gitment.</a></noscript>
{{- end -}}
{{- end }}
-