mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 23:00:48 +00:00
c790029e1d
This should allow for less duplication of templates. Before this commit it was possible to override the content page of a given page/section, but only one page at a time. Full "template sets" can now be inherited by setting `type: blog` etc. in the section content page's front matter, and that type will be considered when looking for layouts for all pages in that section. For nested sections, it will use consider both `type` set in the current section first, then `type` set in the first section below home, e.g. `/docs`. This commit also adds a new Page method: `FirstSection`. This navigates up to the first section below home (e.g. `/docs`). For the home page it will return itself. Fixes #4891 |
||
---|---|---|
.. | ||
docshelper.go | ||
layout.go | ||
layout_base.go | ||
layout_base_test.go | ||
layout_test.go | ||
outputFormat.go | ||
outputFormat_test.go |