While creating my new website I also added more sections, namely a blog, photography, and art section. All of these use list templates and render "article"-like content previews. I wanted to add some content to these lists and Hugo has a special file named
_index.md for that. This file can be used to create index pages for lists.
When I did that I somehow also included the index files in the post listings which was not what I wanted, so I added a if statement to my
article-preview.html template that is used to render article previews.
<article class="article article--in-list" aria-labelledby="article-heading-">
`` checks if the file name is not
_index.md - this will ignore all
_index.md files from being rendered with the