mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⬆️ Chore(libs): update Waline from 1.5.2 to 2.6.1
This commit is contained in:
@@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file.
|
||||
- :wrench: Feat(cdn): add unpkg cdn support
|
||||
- :arrow_up: Chore(libs): update some third-party libraries
|
||||
- Update Artalk from 2.2.12 to 2.3.4 ([#150](https://github.com/Lruihao/FixIt/issues/150))
|
||||
- Update Waline from 1.5.2 to 2.6.1
|
||||
- **Full Changelog:** @Lruihao [`v0.2.14...v0.2.15`](https://github.com/Lruihao/FixIt/compare/v0.2.14...v0.2.15)
|
||||
|
||||
## v0.2.14 [2022.5.15]
|
||||
|
||||
@@ -76,6 +76,6 @@ libFiles:
|
||||
typeitJS: typeit@7.0.4/dist/typeit.min.js
|
||||
# valine@1.4.16 https://github.com/xCss/Valine
|
||||
valineJS: valine@1.4.18/dist/Valine.min.js
|
||||
# waline@1.5.2 https://github.com/walinejs/waline
|
||||
# TODO update
|
||||
walineJS: '@waline/client@1.5.2/dist/Waline.min.js'
|
||||
# waline@2.6.1 https://github.com/walinejs/waline
|
||||
walineCSS: '@waline/client@2.6.1/dist/waline.css'
|
||||
walineJS: '@waline/client@2.6.1/dist/waline.js'
|
||||
@@ -76,6 +76,6 @@ libFiles:
|
||||
typeitJS: typeit@7.0.4/dist/typeit.min.js
|
||||
# valine@1.4.16 https://github.com/xCss/Valine
|
||||
valineJS: valine@1.4.18/dist/Valine.min.js
|
||||
# waline@1.5.2 https://github.com/walinejs/waline
|
||||
# TODO update
|
||||
walineJS: '@waline/client@1.5.2/dist/Waline.min.js'
|
||||
# waline@2.6.1 https://github.com/walinejs/waline
|
||||
walineCSS: '@waline/client@2.6.1/dist/waline.css'
|
||||
walineJS: '@waline/client@2.6.1/dist/waline.js'
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -26,4 +26,4 @@ simple-icons@5.21.1 https://github.com/simple-icons/simple-icons
|
||||
twemoji@14.0.2 https://github.com/twitter/twemoji
|
||||
typeit@7.0.4 https://github.com/alexmacarthur/typeit
|
||||
valine@1.4.18 https://github.com/xCss/Valine
|
||||
waline@1.5.2 https://github.com/walinejs/waline
|
||||
waline@2.6.1 https://github.com/walinejs/waline
|
||||
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -887,17 +887,16 @@ enableEmoji = true
|
||||
[params.page.comment.waline]
|
||||
enable = false
|
||||
serverURL = ""
|
||||
visitor = false
|
||||
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
|
||||
pageview = false
|
||||
emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
||||
meta = ['nick', 'mail', 'link']
|
||||
requiredMeta = []
|
||||
login = 'enable'
|
||||
wordLimit = 0
|
||||
pageSize = 10
|
||||
uploadImage = false
|
||||
highlight = true
|
||||
mathTagSupport = false
|
||||
commentCount = false
|
||||
imageUploader = false
|
||||
highlighter = true
|
||||
comment = false
|
||||
# Facebook comment config (https://developers.facebook.com/docs/plugins/comments)
|
||||
# Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
|
||||
[params.page.comment.facebook]
|
||||
@@ -1116,7 +1115,7 @@ enableEmoji = true
|
||||
# 位于 "themes/FixIt/assets/data/cdn/" 目录
|
||||
# 可以在你的项目下相同路径存放你自己的数据文件:
|
||||
# "assets/data/cdn/"
|
||||
# data = "jsdelivr.yml"
|
||||
# data = "unpkg.yml"
|
||||
|
||||
# Compatibility config
|
||||
# 兼容性设置
|
||||
|
||||
@@ -564,7 +564,7 @@ Please open the code block below to view the complete sample configuration :(fa-
|
||||
Skype = false
|
||||
Trello = false
|
||||
Mix = false
|
||||
# {{< version 0.2.14 changed >}} Comment config
|
||||
# {{< version 0.2.15 changed >}} Comment config
|
||||
[params.page.comment]
|
||||
enable = false
|
||||
# {{< version 0.2.13 >}} {{< link "https://artalk.js.org/" Artalk >}} comment config (https://artalk.js.org/)
|
||||
@@ -580,6 +580,7 @@ Please open the code block below to view the complete sample configuration :(fa-
|
||||
maxNesting = 3
|
||||
# It take effect when `params.page.lightgallery` is enabled
|
||||
lightgallery = false
|
||||
locale = "" # {{< version 0.2.15 >}}
|
||||
# {{< version 0.1.1 >}} {{< link "https://disqus.com/" Disqus >}} comment config (https://disqus.com)
|
||||
[params.page.comment.disqus]
|
||||
enable = false
|
||||
@@ -618,17 +619,21 @@ Please open the code block below to view the complete sample configuration :(fa-
|
||||
[params.page.comment.waline]
|
||||
enable = false
|
||||
serverURL = ""
|
||||
visitor = false
|
||||
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
|
||||
pageview = false # {{< version 0.2.15 >}}
|
||||
emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
||||
meta = ['nick', 'mail', 'link']
|
||||
requiredMeta = []
|
||||
login = 'enable'
|
||||
wordLimit = 0
|
||||
pageSize = 10
|
||||
uploadImage = false
|
||||
highlight = true
|
||||
mathTagSupport = false
|
||||
commentCount = false
|
||||
imageUploader = false # {{< version 0.2.15 >}}
|
||||
highlighter = true # {{< version 0.2.15 >}}
|
||||
comment = false # {{< version 0.2.15 >}}
|
||||
# visitor = false # {{< version 0.2.15 deleted >}} renamed to pageview
|
||||
# uploadImage = false # {{< version 0.2.15 deleted >}} renamed to imageUploader
|
||||
# highlight = true # {{< version 0.2.15 deleted >}} renamed to highlighter
|
||||
# mathTagSupport = false {{< version 0.2.15 deleted >}}
|
||||
# commentCount = false {{< version 0.2.15 deleted >}} renamed to comment
|
||||
# {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config (https://developers.facebook.com/docs/plugins/comments)
|
||||
[params.page.comment.facebook]
|
||||
enable = false
|
||||
@@ -796,11 +801,11 @@ Please open the code block below to view the complete sample configuration :(fa-
|
||||
# {{< version 0.2.7 changed >}} CDN config for third-party library files
|
||||
[params.cdn]
|
||||
# CDN data file name, disabled by default
|
||||
# ("jsdelivr.yml")
|
||||
# ("jsdelivr.yml", "unpkg.yml")
|
||||
# located in "themes/FixIt/assets/data/cdn/" directory
|
||||
# you can store your own data files in the same path under your project:
|
||||
# "assets/data/cdn/"
|
||||
data = ""
|
||||
# data = "unpkg"
|
||||
|
||||
# {{< version 0.2.8 >}} Compatibility config
|
||||
[params.compatibility]
|
||||
|
||||
@@ -566,7 +566,7 @@ hugo
|
||||
Skype = false
|
||||
Trello = false
|
||||
Mix = false
|
||||
# {{< version 0.2.14 changed >}} 评论系统设置
|
||||
# {{< version 0.2.15 changed >}} 评论系统设置
|
||||
[params.page.comment]
|
||||
enable = false
|
||||
# {{< version 0.2.13 >}} {{< link "https://artalk.js.org/" Artalk >}} 评论系统设置 (https://artalk.js.org/)
|
||||
@@ -582,6 +582,7 @@ hugo
|
||||
maxNesting = 3
|
||||
# 当 `params.page.lightgallery` 启用时生效
|
||||
lightgallery = false
|
||||
locale = "" # {{< version 0.2.15 >}}
|
||||
# {{< version 0.1.1 >}} {{< link "https://disqus.com/" Disqus >}} 评论系统设置 (https://disqus.com)
|
||||
[params.page.comment.disqus]
|
||||
enable = false
|
||||
@@ -620,17 +621,21 @@ hugo
|
||||
[params.page.comment.waline]
|
||||
enable = false
|
||||
serverURL = ""
|
||||
visitor = false
|
||||
emoji = ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo']
|
||||
pageview = false # {{< version 0.2.15 >}}
|
||||
emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
||||
meta = ['nick', 'mail', 'link']
|
||||
requiredMeta = []
|
||||
login = 'enable'
|
||||
wordLimit = 0
|
||||
pageSize = 10
|
||||
uploadImage = false
|
||||
highlight = true
|
||||
mathTagSupport = false
|
||||
commentCount = false
|
||||
imageUploader = false # {{< version 0.2.15 >}}
|
||||
highlighter = true # {{< version 0.2.15 >}}
|
||||
comment = false # {{< version 0.2.15 >}}
|
||||
# visitor = false # {{< version 0.2.15 deleted >}} 更名为 pageview
|
||||
# uploadImage = false # {{< version 0.2.15 deleted >}} 更名为 imageUploader
|
||||
# highlight = true # {{< version 0.2.15 deleted >}} 更名为 highlighter
|
||||
# mathTagSupport = false {{< version 0.2.15 deleted >}}
|
||||
# commentCount = false {{< version 0.2.15 deleted >}} 更名为 comment
|
||||
# {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置 (https://developers.facebook.com/docs/plugins/comments)
|
||||
[params.page.comment.facebook]
|
||||
enable = false
|
||||
@@ -797,11 +802,11 @@ hugo
|
||||
# {{< version 0.2.7 changed >}} 第三方库文件的 CDN 设置
|
||||
[params.cdn]
|
||||
# CDN 数据文件名称,默认不启用
|
||||
# ("jsdelivr.yml")
|
||||
# ("jsdelivr.yml", "unpkg.yml")
|
||||
# 位于 "themes/FixIt/assets/data/cdn/" 目录
|
||||
# 可以在你的项目下相同路径存放你自己的数据文件:
|
||||
# "assets/data/cdn/"
|
||||
# data = "jsdelivr.yml"
|
||||
# data = "unpkg.yml"
|
||||
|
||||
# {{< version 0.2.8 >}} 兼容性设置
|
||||
[params.compatibility]
|
||||
|
||||
@@ -109,11 +109,13 @@
|
||||
{{- $waline := $comment.waline | default dict -}}
|
||||
{{- if $waline.enable -}}
|
||||
<div id="waline" class="comment"></div>
|
||||
{{- $source := $cdn.walineJS | default "lib/waline/Waline.min.js" -}}
|
||||
{{- $source := $cdn.walineCSS | default "lib/waline/waline.css" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.walineJS | default "lib/waline/waline.js" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $commentConfig = dict "el" "#waline" "serverURL" $waline.serverURL "lang" .Lang "dark" "body[theme='dark']" "copyright" true | dict "waline" | merge $commentConfig -}}
|
||||
{{- with $waline.visitor -}}
|
||||
{{- $commentConfig = dict "visitor" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- with $waline.pageview -}}
|
||||
{{- $commentConfig = dict "pageview" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with $waline.emoji -}}
|
||||
{{- $commentConfig = dict "emoji" . | dict "waline" | merge $commentConfig -}}
|
||||
@@ -133,14 +135,14 @@
|
||||
{{- with $waline.pageSize -}}
|
||||
{{- $commentConfig = dict "pageSize" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with $waline.uploadImage -}}
|
||||
{{- $commentConfig = dict "uploadImage" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- with $waline.imageUploader -}}
|
||||
{{- $commentConfig = dict "imageUploader" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with $waline.highlight -}}
|
||||
{{- $commentConfig = dict "highlight" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- with $waline.highlighter -}}
|
||||
{{- $commentConfig = dict "highlighter" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with $waline.mathTagSupport -}}
|
||||
{{- $commentConfig = dict "mathTagSupport" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- with $waline.comment -}}
|
||||
{{- $commentConfig = dict "comment" . | dict "waline" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://waline.js.org/" rel="external nofollow noopener noreffer">Waline</a>.
|
||||
|
||||
@@ -66,14 +66,14 @@
|
||||
<span class="comment-visitors" data-flag-title="{{ .Title }}">
|
||||
<i class="fa-regular fa-eye fa-fw"></i> <span id="{{ .RelPermalink }}" class="artalk-visitor-count">-</span> {{ T "views" }}
|
||||
</span>
|
||||
{{- else if ($comment.valine.enable | and $comment.valine.visitor) | or ($comment.waline.enable | and $comment.waline.visitor) -}}
|
||||
{{- else if ($comment.valine.enable | and $comment.valine.visitor) -}}
|
||||
{{- /* Warning: waline v2 will not be compatible with valine */ -}}
|
||||
<span id="{{ .RelPermalink }}" class="leancloud_visitors comment-visitors" data-flag-title="{{ .Title }}">
|
||||
<i class="fa-regular fa-eye fa-fw"></i> <span class="leancloud-visitors-count">-</span> {{ T "views" }}
|
||||
</span>
|
||||
{{- else if $comment.waline.enable | and $comment.waline.visitor -}}
|
||||
{{- else if $comment.waline.enable | and $comment.waline.pageview -}}
|
||||
<span class="comment-visitors" data-flag-title="{{ .Title }}">
|
||||
<i class="fa-regular fa-eye fa-fw"></i> <span id="{{ .RelPermalink }}" class="waline-visitor-count">-</span> {{ T "views" }}
|
||||
<i class="fa-regular fa-eye fa-fw"></i> <span data-path="{{ .RelPermalink }}" class="waline-pageview-count">-</span> {{ T "views" }}
|
||||
</span>
|
||||
{{- else if $comment.twikoo.enable | and $comment.twikoo.visitor -}}
|
||||
<span id="{{ .RelPermalink }}" class="comment-visitors" data-flag-title="{{ .Title }}">
|
||||
@@ -99,9 +99,9 @@
|
||||
<span class="comment-count" data-flag-title="{{ .Title }}">
|
||||
<i class="fa-regular fa-comments fa-fw"></i> <span data-xid="{{ .RelPermalink }}" class="valine-comment-count">-</span> {{ T "comments" }}
|
||||
</span>
|
||||
{{- else if $comment.waline.enable | and $comment.waline.commentCount -}}
|
||||
{{- else if $comment.waline.enable | and $comment.waline.comment -}}
|
||||
<span class="comment-count" data-flag-title="{{ .Title }}">
|
||||
<i class="fa-regular fa-comments fa-fw"></i> <span id="{{ .RelPermalink }}" class="waline-comment-count">-</span> {{ T "comments" }}
|
||||
<i class="fa-regular fa-comments fa-fw"></i> <span data-path="{{ .RelPermalink }}" class="waline-comment-count">-</span> {{ T "comments" }}
|
||||
</span>
|
||||
{{- else if $comment.twikoo.enable | and $comment.twikoo.commentCount -}}
|
||||
<span id="{{ .RelPermalink }}" class="comment-count" data-flag-title="{{ .Title }}">
|
||||
|
||||
+2
-2
@@ -761,7 +761,7 @@ class FixIt {
|
||||
return new Valine(this.config.comment.valine);
|
||||
}
|
||||
if (this.config.comment.waline) {
|
||||
return new Waline(this.config.comment.waline);
|
||||
return Waline.init(this.config.comment.waline);
|
||||
}
|
||||
if (this.config.comment.utterances) {
|
||||
const utterancesConfig = this.config.comment.utterances;
|
||||
@@ -1008,7 +1008,7 @@ class FixIt {
|
||||
this.initMermaid();
|
||||
this.initSearch();
|
||||
|
||||
isMobile = this.util.isMobile()
|
||||
const isMobile = this.util.isMobile()
|
||||
if (isMobile !== resizeBefore) {
|
||||
document.getElementById('mask').click();
|
||||
resizeBefore = isMobile;
|
||||
|
||||
Reference in New Issue
Block a user