fix: waline client config

This commit is contained in:
ciallowo 2021-06-08 17:23:45 +08:00
parent 4e1f769893
commit 10b3ae55a5
No known key found for this signature in database
GPG Key ID: 4E0F5A8CBAD68DCA
2 changed files with 18 additions and 19 deletions

View File

@ -67,18 +67,17 @@ params:
clientId:
clientSecret:
# Waline 前端配置参见 https://waline.js.org/client/basic.html
# Waline client configuration see: https://waline.js.org/en/client/basic.html
# Waline 前端配置参见 https://waline.js.org/reference/client.html
# Waline client configuration see: https://waline.js.org/en/reference/client.html
waline:
serverURL:
placeholder:
wordLimit:
lang:
visitor:
avatar:
avatarCDN:
emojiCDN:
guest_info: "nick,mail,link"
requiredFields:
emoji:
admin:
requiredMeta:
placeholder:
widgets:
enabled:

View File

@ -11,21 +11,21 @@
{{- with .Site.Params.comments.waline -}}
<script>
// 本页配置参见 https://waline.js.org/client/basic.html
// Waline client configuration see: https://waline.js.org/en/client/basic.html
// 本页配置参见 https://waline.js.org/reference/client.html
// Waline client configuration see: https://waline.js.org/en/reference/client.html
new Waline({
el: '#waline',
serverURL: '{{ .serverURL }}',
placeholder: '{{ .placeholder }}',
wordLimit: '{{ .wordLimit }}',
lang: '{{ .lang }}',
visitor: '{{ .visitor }}',
avatar: '{{ .avatar }}',
avatarCDN: '{{ .avatarCDN }}',
emojiCDN: '{{ .emojiCDN }}',
guest_info: '{{ .guest_info }}',
requiredFields: '{{ .requiredFields }}',
langMode: {
admin: '{{ .admin }}'
emoji: ['{{ .emoji }}'],
dark: 'body[data-scheme="dark"]',
requiredMeta: ['{{ .requiredMeta }}'],
locale: {
admin: '{{ .admin }}',
placeholder: '{{ .placeholder }}',
},
});
});
</script>
{{- end -}}