Hi There,
I’m attempting to make a parameter to hide the date on certain posts.
In the post params:
showdate: false
In my template
{{ if .Params.showdate }}
{{ else }}
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
{{ end }}
Obviously this doesn’t work in the way I want it to, seeing as if is looking for a boolean of true, not false.
Is there anyway to reverse the boolean, like {{ if .Params.showdate = "false" }}
or something?
Sorry if I’m missing something obvious!