hugo/output
Bjørn Erik Pedersen c790029e1d
Consider root and current section's content type if set in front matter
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
2018-06-30 13:10:04 +02:00
..
docshelper.go docs: Update theme documentation 2018-06-12 07:38:41 +02:00
layout.go Consider root and current section's content type if set in front matter 2018-06-30 13:10:04 +02:00
layout_base.go Add support for theme composition and inheritance 2018-06-10 23:55:20 +02:00
layout_base_test.go Add support for theme composition and inheritance 2018-06-10 23:55:20 +02:00
layout_test.go Consider root and current section's content type if set in front matter 2018-06-30 13:10:04 +02:00
outputFormat.go Allow partial redefinition of the ouputs config 2018-03-10 16:57:25 +01:00
outputFormat_test.go all: Fix spelling 2017-08-07 20:19:24 +02:00