Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSnailPoet <105149891+SnailPoet@users.noreply.github.com>2022-05-13 20:43:27 +0300
committerGitHub <noreply@github.com>2022-05-13 20:43:27 +0300
commitfbee789806657b45affa963f84b5bb99756f9e21 (patch)
tree0910f68ec55cd219ea0c38e581e6b407993261f6
parentc14fdc977d76a9c32b70ad42747599c6e6f50635 (diff)
fix a Gitalk error "Container not found"
If not, the error will be output to the console when "comment" is set to "false" in front matter.
-rw-r--r--layouts/partials/head.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 36cc6b5..c77986f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -94,7 +94,7 @@
<script src="{{"/js/toc.js" | relURL}}"></script>
{{ end }}
-{{ if and (.Site.Params.enableGitalk) (.IsPage) }}
+{{ if and ( and ( .Site.Params.enableGitalk ) ( .IsPage ) ) ( or ( not ( isset .Params "comment" ) ) ( eq .Params.comment true ) ) }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<script src="{{"/vendor/js/md5.min.js" | relURL}}"></script>