From 9eec31f0b6b6faa4e12abffc34da8857a59940c3 Mon Sep 17 00:00:00 2001 From: luoboQAQ <83707938+luoboQAQ@users.noreply.github.com> Date: Thu, 9 Jun 2022 00:30:52 +0800 Subject: feat(comment): Update Waline to V2 version (#616) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ feat(comment): 更新Waline至V2版本 * 保留placeholder属性 --- exampleSite/config.yaml | 9 ++++----- layouts/partials/comments/provider/waline.html | 10 ++++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b5049ed..7c986fb 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -97,21 +97,20 @@ params: clientSecret: autoCreateIssue: false - # Waline client configuration see: https://waline.js.org/en/reference/client.html + # Waline client configuration see: https://waline.js.org/en/reference/component.html waline: serverURL: lang: - visitor: - avatar: + pageview: emoji: - - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo + - https://unpkg.com/@waline/emojis@1.0.1/weibo requiredMeta: - name - email - url - placeholder: locale: admin: Admin + placeholder: twikoo: envId: diff --git a/layouts/partials/comments/provider/waline.html b/layouts/partials/comments/provider/waline.html index 3b6eee8..21b6507 100644 --- a/layouts/partials/comments/provider/waline.html +++ b/layouts/partials/comments/provider/waline.html @@ -1,4 +1,5 @@ - + +
{{- with .Site.Params.comments.waline -}} {{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}} -{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "avatarcdn" "avatarCDN" "avatarforce" "avatarForce" -}} +{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}} {{- range $key, $val := . -}} {{- if $val -}} @@ -27,6 +29,6 @@ {{- end -}} -- cgit v1.2.3