hubolib: Revert to .Type = "page" when empty
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 26 Jan 2020 14:53:42 +0000 (15:53 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 27 Jan 2020 11:33:33 +0000 (12:33 +0100)
commite8831a056b5664c3a066b9a9c4c618d1f483b10c
treebab3ba09114162976d2ac296f576406f4f2a0dab
parent74b6c4e5ff5ee16f0e6b352a26c1e58b90a25dc6
hubolib: Revert to .Type = "page" when empty

This was changed with good intentions in 0.63.0.

This behaviour was not documented, but it was of course in use.

This commit rolls back to how it behaved before:

For `Page.Type` you will get:

* `type` from front matter if set.
* `.Section`
* If none of the above returns anything, return "page"

Fixes #6805
hugolib/cascade_test.go
hugolib/page__meta.go
hugolib/page_test.go