Hey all!
I’m making a review section on my home page. The reviews are placed in /content/reviews
as markdownfiles (e.g. review1.md
, review2.md
). This works great as I can access the content in a loop on my homepage:
<div class="tiles">
{{ range (where .Site.RegularPages "Section" "reviews" | first 5) }}
<div class="tile">
<p>{{ .Content }}</p>
<em>{{ .Params.author }}</em>
</div>
{{ end }}
</div>
However, this also generates a baseURL/reviews
path (due to the name of the reviews
dir in the content
dir). How can I avoid this path from being generated?
I’ve looked at Build Options | Hugo but I can’t get it to work. Where should the front-matter in that example be coded?
The headless
front matter key also doesn’t seems to work.