From 796b8e6df46056f41c82d2ba74c552558aa3e833 Mon Sep 17 00:00:00 2001 From: Jerry <16351105+jerryc127@users.noreply.github.com> Date: Tue, 21 Apr 2020 21:36:21 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=81=A9=E9=85=8D=20valine=201.4.?= =?UTF-8?q?5,=20=E5=A2=9E=E5=8A=A0emojiCDN=E5=92=8CemojiMaps=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 3 +++ layout/includes/comments/valine.pug | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 92a67d6..266b3e2 100644 --- a/_config.yml +++ b/_config.yml @@ -259,6 +259,8 @@ valine: enable: false # if you want use valine,please set this value is true appId: # leancloud application app id appKey: # leancloud application app key + notify: false # valine mail notify (true/false) Deprecated in v1.4.0+ + verify: false # valine verify code (true/false) Deprecated in v1.4.0+ pageSize: 10 # comment list page size avatar: monsterid # gravatar style https://valine.js.org/#/avatar lang: en # i18n: zh-CN/zh-TW/en/ja @@ -266,6 +268,7 @@ valine: guest_info: nick,mail,link #valine comment header info recordIP: false # Record reviewer IP serverURLs: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in) + emojiCDN: # emoji CDN bg: /img/comment_bg.png # valine background count: true # top_img顯示評論數 diff --git a/layout/includes/comments/valine.pug b/layout/includes/comments/valine.pug index 8d42a0e..faad2da 100644 --- a/layout/includes/comments/valine.pug +++ b/layout/includes/comments/valine.pug @@ -1,3 +1,7 @@ +- let emojiMaps = '""' +if site.data.valine + - emojiMaps = JSON.stringify(site.data.valine) + #vcomment.vcomment script(src=url_for(theme.CDN.valine)) script. @@ -11,11 +15,15 @@ script. el:'#vcomment', appId: '#{theme.valine.appId}', appKey: '#{theme.valine.appKey}', + notify: #{theme.valine.notify}, + verify: #{theme.valine.verify}, placeholder: '#{theme.valine.placeholder}', avatar: '#{theme.valine.avatar}', meta: guest_info, pageSize: '#{theme.valine.pageSize}', lang: '#{theme.valine.lang}', recordIP: #{theme.valine.recordIP}, - serverURLs: '#{theme.valine.serverURLs}' + serverURLs: '#{theme.valine.serverURLs}', + emojiCDN: '#{theme.valine.emojiCDN}', + emojiMaps: !{emojiMaps} });