Hello Everyone!
I am creating a hugo site, with a blog section on it, righ now I am using a custom permalink structure for that section. in config.toml I have this
[permalinks]
blog = "/:section/:year/:month/:day/:title/"
with following content under my blog content
blog/
_index.md
post-1/
index.md
post1-image.jpg
post-2/
index.md
post2-image.jpg
The front matter of my _index.md file under blog is like this
---
title: "Blog"
date: 2020-04-07T20:35:10-06:00
draft: false
phrase: "A phrase for the list template"
banner_image: ""
---
In my blog/list.html template I have this
{{ define "main" }}
{{ .Title }}
{{ .Date }}
{{ .Params.phrase }}
{{ range .Pages }}
{{ .Content }}
{{ end }}
{{ end }}
The problem lies that the front matter data from _index.md is completely ignored, in fact this data is use as it were another post under the dates folder on the resulting public file, but this page does not appear when ranging the pages on the list template. As you can see on the code for list.html, I have a .Date variable but the resulting date is from the most recent post, no the one from the front matter file _index.md ., .Title is just the name of the section. but the .Params.phrase is not rendered, I set all the dates of the posts to be after the one in _index.md but still the issue remains,
I tried eliminating the custom permalink for the section and the issue persists
Only If I use the basic structure
blog/
_index.md
post1.md
post2.md
The front matter for blog/_index.md was rendered
I am using
hugo v0.84.0-2C4689F7B+extended windows/amd64 BuildDate=2021-06-18T17:14:27Z VendorInfo=gohugoio
Thank you in advance.