mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⬆️ Fix: update Artalk comments to the latest version and and useBackendConf param
Fixes #415
This commit is contained in:
@@ -13,9 +13,9 @@ libFiles:
|
||||
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
|
||||
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
|
||||
# artalk@2.6.4 https://github.com/ArtalkJS/Artalk
|
||||
artalkCSS: artalk@2.6.4/dist/Artalk.css
|
||||
artalkJS: artalk@2.6.4/dist/Artalk.js
|
||||
# artalk@latest https://github.com/ArtalkJS/Artalk
|
||||
artalkCSS: artalk@latest/dist/Artalk.css
|
||||
artalkJS: artalk@latest/dist/Artalk.js
|
||||
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
|
||||
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
|
||||
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
|
||||
|
||||
@@ -13,9 +13,9 @@ libFiles:
|
||||
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
|
||||
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
|
||||
# artalk@2.6.4 https://github.com/ArtalkJS/Artalk
|
||||
artalkCSS: artalk@2.6.4/dist/Artalk.css
|
||||
artalkJS: artalk@2.6.4/dist/Artalk.js
|
||||
# artalk@latest https://github.com/ArtalkJS/Artalk
|
||||
artalkCSS: artalk@latest/dist/Artalk.css
|
||||
artalkJS: artalk@latest/dist/Artalk.js
|
||||
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
|
||||
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
|
||||
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
algoliasearch@4.20.0 https://github.com/algolia/algoliasearch-client-javascript
|
||||
animate.css@4.1.1 https://github.com/daneden/animate.css
|
||||
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
artalk@2.6.4 https://github.com/ArtalkJS/Artalk
|
||||
artalk@latest https://github.com/ArtalkJS/Artalk
|
||||
autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
|
||||
cell-watermark@1.0.3 https://github.com/Lruihao/watermark
|
||||
cookieconsent@3.1.1 https://github.com/osano/cookieconsent
|
||||
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
@@ -802,6 +802,8 @@ enableEmoji = true
|
||||
enable = false
|
||||
server = "https://yourdomain"
|
||||
site = "默认站点"
|
||||
# FixIt 0.3.3 | NEW whether use backend configuration
|
||||
useBackendConf = false
|
||||
placeholder = ""
|
||||
noComment = ""
|
||||
sendBtn = ""
|
||||
|
||||
@@ -15,18 +15,22 @@
|
||||
{{- $artalk := $comment.artalk | default dict -}}
|
||||
{{- if $artalk.enable -}}
|
||||
<div id="artalk" class="comment"></div>
|
||||
{{- $source := $cdn.artalkCSS | default "lib/artalk/Artalk.css" -}}
|
||||
{{- $source := $cdn.artalkCSS | default (add $artalk.server "/dist/Artalk.css") -}}
|
||||
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.artalkJS | default "lib/artalk/Artalk.js" -}}
|
||||
{{- $source := $cdn.artalkJS | default (add $artalk.server "/dist/Artalk.js") -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $commentConfig = dict "el" "#artalk" "pageKey" .Permalink "pageTitle" .Title "pvEl" "artalk-visitor-count" "countEl" "artalk-comment-count" | dict "artalk" | merge $commentConfig -}}
|
||||
{{- if (eq $artalk.locale "") | and (eq $.Site.LanguageCode "en") -}}
|
||||
{{- $artalk = dict "locale" "en-US" | merge $artalk -}}
|
||||
{{- end -}}
|
||||
{{- $commentConfig = dict "locale" ($artalk.locale | default $.Site.LanguageCode | default "auto") | dict "artalk" | merge $commentConfig -}}
|
||||
{{- if eq $artalk.usebackendconf false -}}
|
||||
{{- $commentConfig = dict "useBackendConf" false | dict "artalk" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.gravatar -}}
|
||||
{{/* See https://artalk.js.org/guide/frontend/config.html#gravatar-params */}}
|
||||
{{- $commentConfig = dict "mirror" .Host "params" (printf "d=%v&s=240" .Style) | dict "gravatar" | dict "artalk" | merge $commentConfig -}}
|
||||
{{- $gravatarMirror := printf "https://%v/avatar/" .Host -}}
|
||||
{{- $commentConfig = dict "mirror" $gravatarMirror "params" (printf "d=%v&s=240" .Style) | dict "gravatar" | dict "artalk" | merge $commentConfig -}}
|
||||
{{- end -}}
|
||||
{{- with $artalk.server -}}
|
||||
{{- $commentConfig = dict "server" . | dict "artalk" | merge $commentConfig -}}
|
||||
|
||||
Reference in New Issue
Block a user