This is not a duplicate of: Setting a custom single layout for nested section (or any other similar issue I could find)
Reproduction: GitHub - Hrishikesh-K/hugo-43833
Goal:
For all content pages in the “work” section, I wish to have a base layout and then each page would separately have its specific content on it. So I want the inheriting something like:
layouts/_default/baseof.html
- layouts/work/single-baseof.html
- layouts/work/work-1-1.html
That’s how I thought it would work when I read base template for single pages, but for some reason, I seem to have it wrong.
Result I’m getting:
A 404 when I visit /work/work-1/work-1-1/
.
Alternatives considered:
I could add conditional logic to layouts/_default/baseof.html
to add the “common” stuff there, but would like to avoid it if possible.
Additional notes:
The problem doesn’t occur if I remove single-baseof.html
and directly use work-1-1.html
to inherit baseof.html
.
What am I missing, or how can I achieve the above scenario?