From 96c53604794280fcf338df62ca81f0a38db9cdaa Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 21:58:39 -0600 Subject: [PATCH] no kudos on 404 --- config/_default/params.toml | 1 + content/404.md | 1 + layouts/_default/single.html | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index c20f40a..2214054 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -25,6 +25,7 @@ giscusStrict = "0" giscusTheme = "noborder_gray" analytics = true +kudos = true [author] name = "John Bowdre" diff --git a/content/404.md b/content/404.md index 6eff99f..03637e1 100644 --- a/content/404.md +++ b/content/404.md @@ -3,6 +3,7 @@ title = "404'd!" noindex = true timeless = true comments = true +kudos = false +++ We're not sure what you were looking for but it's not here. diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c4e22aa..4399145 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -42,7 +42,13 @@ {{- end }} {{- if ne $showComments false }}
- {{- if eq .Site.Params.analytics true }} + {{- $showKudos := true }} + {{- if eq .Site.Params.kudos false }} + {{- $showKudos = false }} + {{- else if eq .Params.kudos false }} + {{- $showKudos = false }} + {{- end }} + {{- if and (eq .Site.Params.analytics true) (ne $showKudos false) }} Enjoyed this post?  {{- end }} {{- partial "comments" . }}