I am breaking my head over this right now. I am writing a really long article about some technical stuff and I just want to have multiple pages. Sure, I could use multiple articles basically, but my front page shows the latest articles and I don’t want 5 entries of 1 topic in a category.
I have tried to use a leaf bundle for that with this structure:
my-post
--- index.md (first page)
--- page-2.md
However, linking to page 2 proves difficult as the page somehow does not exist:
If you name it index.md then this becomes a page bundle. page-2.md will be treated as a Page-type resource, and will not have a Permalink. See: Page bundles | Hugo and Page resources | Hugo
You may want to turn this into a _index.md instead, so that the child pages are published and navigable, but you may have to modify your layout listing templates.
Here’s a working minimal example. See the README for details.
git clone --single-branch -b hugo-forum-topic-29161 https://github.com/jmooring/hugo-testing hugo-forum-topic-29161
cd hugo-forum-topic-29161
hugo server