Hugo: index vs. _index
Posted on May 2, 2023 (Last modified on July 2, 2024) • 1 min read • 125 wordsI renamed ./content/about.md
to ./content/index.md
, and poof! … all tags gone, all blog postings gone.
What?!
It makes sense, if you think about it.
index.md
is a special file, which automatically marks the directory it is in
as a so-called
“leaf-bundle”,
which then makes all the files and directories and all directories become
“irrelevant” – a
leaf bundle has no children.
So, what I actually wanted to do was to rename it to _index.md
, which marks
./content
as what it is – a
branch bundle.
Or in short: don’t put index.md
files in ./content
. If you want to update
your home page, use _index.md
.
Sources: