I have several directories which contain tagged content pieces, like features, testimonials, faqs, etc. Here is how the frontmatter looks at one of the examples:
---
title: "Otto M."
date: 2021-01-09T21:30:52+01:00
draft: false
weight: 1
type: testimonial
tags:
- review_manager
---
##### Great features, fast and intuitive interface, happy customer.
This file resides in:
|- content
|- testimonials
| testimonial_1.en.md
| testimonial_[X].[lang].md
Right now the pages are being rendered and included in the sitemaps, which is not intended. If I include an _index.md
or _index.en.md
in the “testimonials” directory and add this frontmatter to it (and nothing else):
---
title:
cascade:
build:
render: never
list: always
---
it does stop rendering unwanted pages, but then the template will have zero range for this tag in a loop like this:
{{ range .Site.Taxonomies.tags.review_manager }}
<div class="testimonial">
{{ .Content }}
<p><span>{{ .Title }}</span></p>
</div>
{{ end }}
My config/hugo.toml
includes
[taxonomies]
tag = "tags"
I have to use tags, as the contents is being reused in different places and .Site.Taxonomies.tags seems to fit this purpose well.