Short version: Is there an easy way to make an arbitrary page “headless” (not show up in search, lists, …)?
The documentation clearly states “only page bundles” - of course, I had to experiment to actually realize this (https://github.com/gohugoio/hugo/issues/5517 helped).
So, if I understand correctly headless:true
only really works on files named index.md
(which are in subdirectories, and therefore “page bundles”).
Is there some way for me to mix headed and headless pages in a single directory?
I’d like to have a section (directory) with a _index.md (it is a list page), a bunch of pages that are listed (say a.md, b.md, c.md) and some pages that are not listed (say, shared.md
) that those pages refer to, but do not appear by themselves.
I have achieved this by making a subdirectory with an index.md
file (that has no content other than frontmatter headless: true
, and putting shared.md
in that subdirectory. But I was hoping I could keep a.md, b.md, and shared.md all together.
I would also understand the argument that I shouldn’t want this: that it is better data management practice to keep the headless pages in a separate place.