fix: Added support for waline's turnstileKey

This commit is contained in:
Lparksi 2025-04-05 20:00:18 +08:00 committed by GitHub
parent 9e6b7b22a9
commit d94e010f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@
{{- with .Site.Params.comments.waline -}} {{- with .Site.Params.comments.waline -}}
{{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}} {{- $config := dict "el" "#waline" "dark" `html[data-scheme="dark"]` -}}
{{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" -}} {{- $replaceKeys := dict "serverurl" "serverURL" "requiredmeta" "requiredMeta" "wordlimit" "wordLimit" "pagesize" "pageSize" "imageuploader" "imageUploader" "texrenderer" "texRenderer" "turnstilekey" "turnstileKey" -}}
{{- range $key, $val := . -}} {{- range $key, $val := . -}}
{{- if ne $val nil -}} {{- if ne $val nil -}}
@ -29,6 +29,6 @@
<script> <script>
/// Waline client configuration see: https://waline.js.org/en/reference/client.html /// Waline client configuration see: https://waline.js.org/en/reference/client.html
Waline.init({{ $config | jsonify | safeJS }}); Waline.init({{ $config | jsonify | safeJS }});
</script> </script>
{{- end -}} {{- end -}}