Page teasers, section lists and nav dropdown never list editor-created pages #142

Closed
opened 2026-10-04 15:35:56 +02:00 by dominik.polakovics · 0 comments

Problem

The Page teasers element (page-teasers), the section list page (_default/list.html) and the header dropdown collect a section's children with Hugo's .RegularPages. That collection excludes branch bundles, and every page the editor creates is a branch bundle (<slug>/_index.md). On an editor-built site all three listings are therefore always empty, with no warning.

Reproduced with the pinned Hugo 0.163.3: a section whose children are _index.md bundles renders an empty <ul class="ce-teasers__list">; the same section with plain .md children renders teasers. The demo site in testdata/library-site only has plain-file children, so the tests never caught it.

Fix

Read children from .Pages (immediate children of either kind), as the news bundle's templates already do. Because that would also unfold every news article under the News menu entry, add a hideChildren: true front-matter flag that suppresses a section's nav dropdown, stamped on news sections by the news page type's defaults. Add branch-bundle fixtures to the demo site and pin the behaviour in the theme tests.

## Problem The Page teasers element (`page-teasers`), the section list page (`_default/list.html`) and the header dropdown collect a section's children with Hugo's `.RegularPages`. That collection excludes branch bundles, and every page the editor creates is a branch bundle (`<slug>/_index.md`). On an editor-built site all three listings are therefore always empty, with no warning. Reproduced with the pinned Hugo 0.163.3: a section whose children are `_index.md` bundles renders an empty `<ul class="ce-teasers__list">`; the same section with plain `.md` children renders teasers. The demo site in `testdata/library-site` only has plain-file children, so the tests never caught it. ## Fix Read children from `.Pages` (immediate children of either kind), as the news bundle's templates already do. Because that would also unfold every news article under the News menu entry, add a `hideChildren: true` front-matter flag that suppresses a section's nav dropdown, stamped on news sections by the news page type's `defaults`. Add branch-bundle fixtures to the demo site and pin the behaviour in the theme tests.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/deckle#142
No description provided.