mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Perf: optimize Artalk config (#54)
This commit is contained in:
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
@@ -712,8 +712,10 @@ enableEmoji = true
|
||||
# Artalk 评论系统设置 (https://artalk.js.org/) since v0.2.12
|
||||
[params.page.comment.artalk]
|
||||
enable = false
|
||||
pageKey = ""
|
||||
pageTitle = ""
|
||||
server = "https://yourdomain/api/"
|
||||
site = "your site name"
|
||||
site = "默认站点"
|
||||
placeholder = ""
|
||||
noComment = ""
|
||||
sendBtn = ""
|
||||
|
||||
@@ -504,8 +504,10 @@ Please open the code block below to view the complete sample configuration :(far
|
||||
# {{< link "https://artalk.js.org/" Artalk >}} comment config (https://artalk.js.org/)
|
||||
[params.page.comment.artalk]
|
||||
enable = false
|
||||
pageKey = ""
|
||||
pageTitle = ""
|
||||
server = "https://yourdomain/api/"
|
||||
site = "your site name"
|
||||
site = "默认站点"
|
||||
placeholder = ""
|
||||
noComment = ""
|
||||
sendBtn = ""
|
||||
|
||||
@@ -515,8 +515,10 @@ hugo
|
||||
# {{< link "https://artalk.js.org/" Artalk >}} 评论系统设置 (https://artalk.js.org/)
|
||||
[params.page.comment.artalk]
|
||||
enable = false
|
||||
pageKey = ""
|
||||
pageTitle = ""
|
||||
server = "https://yourdomain/api/"
|
||||
site = "你的网站名称"
|
||||
site = "默认站点"
|
||||
placeholder = ""
|
||||
noComment = ""
|
||||
sendBtn = ""
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.artalkJS | default "lib/artalk/Artalk.min.js" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $commentConfig = dict "el" "#artalk" "server" $artalk.server "site" $artalk.site "placeholder" $artalk.placeholder "noComment" $artalk.noComment "sendBtn" $artalk.sendBtn "editorTravel" $artalk.editorTravel "flatMode" $artalk.flatMode "maxNesting" $artalk.maxNesting | dict "artalk" | merge $commentConfig -}}
|
||||
{{- $commentConfig = dict "el" "#artalk" "pageKey" $artalk.pageKey "pageTitle" $artalk.pageTitle "server" $artalk.server "site" $artalk.site "placeholder" $artalk.placeholder "noComment" $artalk.noComment "sendBtn" $artalk.sendBtn "editorTravel" $artalk.editorTravel "flatMode" $artalk.flatMode "maxNesting" $artalk.maxNesting | dict "artalk" | merge $commentConfig -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://github.com/ArtalkJS/Artalk" rel="license external nofollow noopener noreffer">Artalk</a>.
|
||||
</noscript>
|
||||
|
||||
+5
-1
@@ -594,7 +594,11 @@ class Theme {
|
||||
initComment() {
|
||||
if (this.config.comment) {
|
||||
if (this.config.comment.artalk){
|
||||
new Artalk(this.config.comment.artalk)
|
||||
const artalk = new Artalk(this.config.comment.artalk);
|
||||
artalk.setDarkMode(this.isDark);
|
||||
this.switchThemeEventSet.add(() => {
|
||||
artalk.setDarkMode(this.isDark);
|
||||
})
|
||||
}
|
||||
if (this.config.comment.gitalk) {
|
||||
this.config.comment.gitalk.body = decodeURI(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user