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:
authorIsaac Lin <me@isaaclin.cn>2019-11-11 11:03:39 +0300
committerIsaac Lin <me@isaaclin.cn>2019-11-11 11:03:39 +0300
commit7a8aa4d6d2f4fa25e725415f78862bf03c88d1c7 (patch)
treec3832bfe7810dfedfeb4150e211022f83eb61a6f
parent4ad8f3b2ad3fc6ede7572a136abdc211ac973833 (diff)
Add i18n support for Valine.
-rw-r--r--exampleSite/config.toml14
-rw-r--r--layouts/partials/comments.html9
2 files changed, 12 insertions, 11 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 180b12f..af0a889 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -54,12 +54,13 @@
<script type="text/javascript">
new Valine({
el: '#vcomments',
- appId: '{{ .Site.Params.valine.appId }}',
- appKey: '{{ .Site.Params.valine.appKey }}',
+ 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 }}',
+ avatar: {{ .Site.Params.valine.avatar }},
+ placeholder: {{ .Site.Params.valine.placeholder }},
visitor: {{ .Site.Params.valine.visitor }},
});
</script>