Home page bundle may contain content pages but the documentation states it's not allowed

The Page Bundles page in the docs states that a home page bundle may not contain content files.

but hugo will accept that without any warning and error and generates the site.

looks like a bug in either hugo or the docs…am I missing something.

tested with:

  • hugo v0.123.7-312735366b20d64bd61bff8627f593749f86c964+extended windows/amd64 BuildDate=2024-03-01T16:16:06Z VendorInfo=gohugoio
  • hugo v0.123.8-5fed9c591b694f314e5939548e11cc3dcb79a79c+extended windows/amd64 BuildDate=2024-03-07T13:14:42Z VendorInfo=gohugoio


but it’s not a problem to create content pages at the root level

it’s simple to reproduce, but here’s a repo, just in case: GitHub - irkode/hugodefault at nonemty_homepage_bundle

hugo new site test
cd test
hugo new theme test
echo "theme = 'test'" >> hugo.toml
hugo new content post-4.md
echo "sometext" >> content/post-4.md

generate the site and the forth page is rendered. Ofc not from the posts section

│   index.html
│       index.html
│       index.html
│   │   index.html
│   │
│   ├───post-1
│   │       index.html
│   │
│   ├───post-2
│   │       index.html
│   │
│   └───post-3
│           bryce-canyon.jpg
│           index.html

Please create an issue in the docs repository, but note that all of this will be revised in https://github.com/gohugoio/hugoDocs/issues/2307.

I filed the issue #2476 and referenced #2307.

An by the fast answer with docs issue I assume it’s ok to have content in home page bundle. Right?

This all works fine:

├── images/
│   ├── b.jpg  <-- resource of content/_index.md 
│   └── c.jpg  <-- resource of content/_index.md
├── _index.md
├── a.jpg      <-- resource of content/_index.md
├── about.md   <-- just another page
└── privacy.md <-- just another page

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.