Merge branch 'master' into master

This commit is contained in:
HighDoping 2025-06-07 11:15:53 +08:00 committed by GitHub
commit ec835779f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 7 deletions

View File

@ -6,7 +6,7 @@
</h2>
<footer class="article-time">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
</time>
</footer>
</div>

View File

@ -21,8 +21,12 @@
}
function lazyLoadDisqusJS() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
const excludedHosts = ["localhost", "127.0.0.1"];
const hostname = window.location.hostname;
if (excludedHosts.includes(hostname)) {
document.getElementById('disqus_thread').innerHTML =
'Disqus comments not available by default when the website is previewed locally.';
return;
}

View File

@ -18,9 +18,10 @@
proxy: {{- .proxy -}},
});
(function () {
if (
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
) {
const excludedHosts = ["localhost", "127.0.0.1"];
const hostname = window.location.hostname;
if (excludedHosts.includes(hostname)) {
document.getElementById("gitalk-container").innerHTML =
"Gitalk comments not available by default when the website is previewed locally.";
return;

View File

@ -16,7 +16,7 @@
{{- with .Site.Params.comments.waline -}}
{{- $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 := . -}}
{{- if ne $val nil -}}