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

github.com/g1eny0ung/hugo-theme-dream.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkapravo Das <40303218+raiden076@users.noreply.github.com>2021-08-06 06:37:08 +0300
committerGitHub <noreply@github.com>2021-08-06 06:37:08 +0300
commit4c7f7c8fe113e7e49dd5230e876c2bcc026ec9fc (patch)
treed37186a13f3b532b8d063a9971a02dd2efd35d18
parentd18f69e94983fc8e8905476d2b803a13024d0d1e (diff)
Added Valine language support (#241)
-rw-r--r--docs/params-configurations.md6
-rwxr-xr-xexampleSite/config.toml1
-rw-r--r--layouts/_default/single.html3
3 files changed, 8 insertions, 2 deletions
diff --git a/docs/params-configurations.md b/docs/params-configurations.md
index e5d365f..4778566 100644
--- a/docs/params-configurations.md
+++ b/docs/params-configurations.md
@@ -36,6 +36,7 @@
# valine = true
# LEANCLOUD_APP_ID = ""
# LEANCLOUD_APP_KEY = ""
+ # VALINE_LANGUAGE = ""
email = "g1enyy0ung@gmail.com"
twitter = "g1eny0ung"
@@ -199,14 +200,17 @@ View <https://utteranc.es> to get more details.
Valine is a fast, simple & efficient Leancloud based no back end comment system.
-In order to make it work, you still need to set two parameters:
+In order to make it work, you still need to set first two parameters:
```toml
[params]
LEANCLOUD_APP_ID = ""
LEANCLOUD_APP_KEY = ""
+ VALINE_LANGUAGE = ""
```
+Default language param is "zh-CN" , other supported languages are "zh-TW" , "en" , "ja" .
+
View <https://valine.js.org/en/quickstart> to get more details.
### Social Links
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 24b7dbf..73c735d 100755
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -43,6 +43,7 @@ theme = "hugo-theme-dream"
# valine = true
# LEANCLOUD_APP_ID = ""
# LEANCLOUD_APP_KEY = ""
+ # VALINE_LANGUAGE = ""
email = "g1enyy0ung@gmail.com"
# twitter = ""
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 63147ef..5339f7a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -136,7 +136,8 @@
new Valine({
el: '#vcomments',
appId: {{ .Site.Params.LEANCLOUD_APP_ID }},
- appKey: {{ .Site.Params.LEANCLOUD_APP_KEY }}
+ appKey: {{ .Site.Params.LEANCLOUD_APP_KEY }},
+ lang: {{ .Site.Params.VALINE_LANGUAGE }}
})
</script>
{{ end }}