Hi
I’m facing an issue on which I need help. My post markdown is as follows :
---
title: "Announcing a great conference"
eventdate: '2020-03-12'
date: '2020-02-21'
tags:
- conference
- culture
- society
---
Now, I can use .Params.eventdate in, say header.html, it works OK.
What does NOT work is in list.html :
<div class="posts-list">
{{ range .Paginator.Pages }}
<article class="post-preview">
<a href="{{ .Permalink }}">
<h2 class="post-title">{{ .Title }}</h2>
{{ if .Params.subtitle }}
<h3 class="post-subtitle">
{{ .Params.subtitle }}
</h3>
{{ end }}
</a>
<p>
{{ if .Params.eventdate }}
*** THIS PART SHOULD DISPLAY BUT DOES NOT ***
{{ end }}
</p>
[...]
</article>
{{ end }}
</div>
If I replace .Params.eventdate with .Params.subtitle, .Params.tags, .Params.title… all these work OK. So why doesn’t my eventdate work ? I think it’s related to being inside of the {{ range .Paginator.Pages }}
, but I may be wrong.
Thanks for any help on getting this working !
-> hugo env
Hugo Static Site Generator v0.66.0/extended linux/amd64 BuildDate: unknown
GOOS=“linux”
GOARCH=“amd64”
GOVERSION=“go1.14”