From 4ad8f3b2ad3fc6ede7572a136abdc211ac973833 Mon Sep 17 00:00:00 2001 From: Isaac Lin Date: Mon, 11 Nov 2019 15:49:20 +0800 Subject: Bug of Valine comments fixed. --- layouts/partials/comments.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index e720f46..180b12f 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -41,11 +41,13 @@ {{- if .Site.Params.valine.enable -}} + {{- if .Site.Params.valine.visitor -}} - - 1000000 + + 0

+ {{- end -}}
@@ -54,11 +56,11 @@ el: '#vcomments', appId: '{{ .Site.Params.valine.appId }}', appKey: '{{ .Site.Params.valine.appKey }}', - notify: '{{ .Site.Params.valine.notify }}', - verify: '{{ .Site.Params.valine.verify }}', + 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 }}', + visitor: {{ .Site.Params.valine.visitor }}, }); {{- end -}} @@ -97,4 +99,3 @@ {{- end -}} {{- end }} - -- cgit v1.2.3 From 7a8aa4d6d2f4fa25e725415f78862bf03c88d1c7 Mon Sep 17 00:00:00 2001 From: Isaac Lin Date: Mon, 11 Nov 2019 16:03:39 +0800 Subject: Add i18n support for Valine. --- exampleSite/config.toml | 14 +++++++------- layouts/partials/comments.html | 9 +++++---- 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 @@ -- cgit v1.2.3