From 858fbf3eb80dd545e00607afd07c6b53ed54a8c2 Mon Sep 17 00:00:00 2001 From: Abdul Halim Daud Date: Wed, 20 Jul 2022 00:22:39 +0800 Subject: [PATCH] fix waline config imageUploader = false & highlighter = false imageUploader and highlighter is still enabled even though the config is set to false because waline's default setting for imageUploader & highlighter is enabled. to disable imageUploader and highlighter, need to explicitly specify imageUploader: false and highlighter: false in the window.config. --- layouts/partials/single/comment.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/single/comment.html b/layouts/partials/single/comment.html index eb2bcc68..4ea4b11f 100644 --- a/layouts/partials/single/comment.html +++ b/layouts/partials/single/comment.html @@ -113,7 +113,7 @@ {{- 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 -}} + {{- $commentConfig = dict "el" "#waline" "serverURL" $waline.serverURL "lang" .Lang "dark" "body[theme='dark']" "copyright" true "imageUploader" false "highlighter" false | dict "waline" | merge $commentConfig -}} {{- with $waline.pageview -}} {{- $commentConfig = dict "pageview" . | dict "waline" | merge $commentConfig -}} {{- end -}}