Skip to content

Commit

Permalink
no kudos on 404
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowdre committed Jan 22, 2024
1 parent 0869b0a commit 96c5360
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ giscusStrict = "0"
giscusTheme = "noborder_gray"

analytics = true
kudos = true

[author]
name = "John Bowdre"
Expand Down
1 change: 1 addition & 0 deletions content/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@
{{- end }}
{{- if ne $showComments false }}
<hr>
{{- 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) }}
<span class="post_kudos">Enjoyed this post?&nbsp;<button class="tinylytics_kudos"></button></span>
{{- end }}
{{- partial "comments" . }}
Expand Down

0 comments on commit 96c5360

Please sign in to comment.