Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update waline config #244

Merged
merged 3 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/data/cdn/jsdelivr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ libFiles:
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# valine@1.4.14 https://valine.js.org/
valineJS: valine@1.4.14/dist/Valine.min.js
# waline@1.3.3 https://waline.js.org/
walineJS: "@waline/client@1.3.3/dist/Waline.min.js"
# waline@1.3.8 https://waline.js.org/
walineJS: "@waline/client@1.3.8/dist/Waline.min.js"
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
Expand Down
2 changes: 1 addition & 1 deletion assets/lib/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ typeit@7.0.4 https://github.com/alexmacarthur/typeit
valine@1.4.14 https://valine.js.org
vssue@1.4.8 https://vssue.js.org
vue@v2.6.14 https://vuejs.org
waline@1.3.3 https://waline.js.org
waline@1.3.8 https://waline.js.org
2 changes: 1 addition & 1 deletion assets/lib/waline/Waline.min.js

Large diffs are not rendered by default.

160 changes: 0 additions & 160 deletions assets/lib/waline/Waline.scss

This file was deleted.

24 changes: 10 additions & 14 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -768,22 +768,18 @@ enableEmoji = true
# Waline comment config (https://waline.js.org)
# Waline 评论系统设置 (https://waline.js.org)
[params.page.comment.waline]
enable = false
serverURL = "https://doit-docs-comment.vercel.app/"
placeholder = "Just Go Go."
enable = true
serverURL = ""
visitor = false
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
meta = ['nick', 'mail', 'link']
requiredMeta = []
login = 'enable'
wordLimit = 0
avatar = "mp"
meta = ["nick", "mail", "link"]
pageSize = 10
lang = "en"
visitor = true
uploadImage = false
highlight = true
avatarCDN = ""
avatarForce = false
emojiCDN = ""
emojiMaps = ""
requiredFields = []
anonymous = false
mathTagSupport = false
# Facebook comment config (https://developers.facebook.com/docs/plugins/comments)
# Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
[params.page.comment.facebook]
Expand Down Expand Up @@ -821,7 +817,7 @@ enableEmoji = true
# Twikoo comment config (https://twikoo.js.org/)
# Twikoo comment 评论系统设置 (https://twikoo.js.org/)
[params.page.comment.twikoo]
enable = true
enable = false
envId = "https://doit-docs-comment-twikoo.vercel.app/"
region = ""
path = ""
Expand Down
20 changes: 8 additions & 12 deletions exampleSite/content/posts/theme-documentation-basics/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,23 +555,19 @@ Please open the code block below to view the complete sample configuration :(far
emoji = ""
# {{< link "https://github.com/xCss/Valine" Waline >}} comment config
[params.page.comment.waline]
# {{< version 0.2.11 >}}
# {{< version 0.2.13 changed >}}
enable = false
serverURL = ""
placeholder = "Just Go Go."
visitor = false
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
meta = ['nick', 'mail', 'link']
requiredMeta = []
login = 'enable'
wordLimit = 0
avatar = "mp"
meta = ["nick", "mail", "link"]
pageSize = 10
lang = "en"
visitor = true
uploadImage = false
highlight = true
avatarCDN = ""
avatarForce = false
emojiCDN = ""
emojiMaps = ""
requiredFields = []
anonymous = false
mathTagSupport = false
# {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config
[params.page.comment.facebook]
enable = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,23 +559,19 @@ hugo
emoji = ""
# {{< link "https://github.com/xCss/Valine" Waline >}} 评论系统设置
[params.page.comment.waline]
# {{< version 0.2.11 >}}
# {{< version 0.2.13 changed >}}
enable = false
serverURL = ""
placeholder = "Just Go Go."
visitor = false
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
meta = ['nick', 'mail', 'link']
requiredMeta = []
login = 'enable'
wordLimit = 0
avatar = "mp"
meta = ["nick", "mail", "link"]
pageSize = 10
lang = "en"
visitor = true
uploadImage = false
highlight = true
avatarCDN = ""
avatarForce = false
emojiCDN = ""
emojiMaps = ""
requiredFields = []
anonymous = false
mathTagSupport = false
# {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置
[params.page.comment.facebook]
enable = false
Expand Down
49 changes: 16 additions & 33 deletions layouts/partials/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,52 +64,35 @@
{{- $waline := $comment.waline | default dict -}}
{{- if $waline.enable -}}
<div id="waline" class="comment"></div>
{{- $options := dict "targetPath" "lib/waline/Waline.min.css" -}}
{{- dict "Source" "lib/waline/Waline.scss" "ToCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/pjaxStyle.html" -}}
{{- $source := $cdn.walineJS | default "lib/waline/Waline.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/pjaxScript.html" -}}
{{- $commentConfig = dict "el" "#waline" "serverURL" $waline.serverURL | dict "waline" | merge $commentConfig -}}
{{- with $waline.placeholder -}}
{{- $commentConfig = dict "placeholder" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.wordLimit -}}
{{- $commentConfig = dict "wordLimit" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.avatar -}}
{{- $commentConfig = dict "avatar" . | dict "waline" | merge $commentConfig -}}
{{- $commentConfig = dict "el" "#waline" "serverURL" $waline.serverURL "lang" .Lang "dark" "body[theme='dark'], body[theme='black']" "copyright" false | dict "waline" | merge $commentConfig -}}
{{- with $waline.emoji -}}
{{- $commentConfig = dict "emoji" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.meta -}}
{{- $commentConfig = dict "meta" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.requiredMeta -}}
{{- $commentConfig = dict "requiredMeta" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.login -}}
{{- $commentConfig = dict "login" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.wordLimit -}}
{{- $commentConfig = dict "wordLimit" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.pageSize -}}
{{- $commentConfig = dict "pageSize" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.lang -}}
{{- $commentConfig = dict "lang" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.visitor -}}
{{- $commentConfig = dict "visitor" . | dict "waline" | merge $commentConfig -}}
Comment on lines -90 to -91
Copy link
Owner Author

@HEIGE-PCloud HEIGE-PCloud Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Causing the problem in #263

{{- with $waline.uploadImage -}}
{{- $commentConfig = dict "uploadImage" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.highlight -}}
{{- $commentConfig = dict "highlight" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.avatarCDN -}}
{{- $commentConfig = dict "avatarCDN" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.avatarForce -}}
{{- $commentConfig = dict "avatarForce" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.emojiCDN -}}
{{- $commentConfig = dict "emojiCDN" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.emojiMaps -}}
{{- $commentConfig = dict "emojiMaps" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.requiredFields -}}
{{- $commentConfig = dict "requiredFields" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
{{- with $waline.anonymous -}}
{{- $commentConfig = dict "anonymous" . | dict "waline" | merge $commentConfig -}}
{{- with $waline.mathTagSupport -}}
{{- $commentConfig = dict "mathTagSupport" . | dict "waline" | merge $commentConfig -}}
{{- end -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://waline.js.org/">Waline</a>.
Expand Down