hugolib: Fix .Site.GetPage regression
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 24 Jul 2018 08:10:51 +0000 (10:10 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 24 Jul 2018 09:37:59 +0000 (11:37 +0200)
commit04d4c08dbcac08ff7feeb88863e91799fed0937b
tree0c1dd87f381690c73b356602a52cb82b333f12c8
parent016dd4a69a765061bb3da8490d3cac6ec47a91eb
hugolib: Fix .Site.GetPage regression

In Hugo 0.44 we simplified the `.Site.GetPage` API and added code to handle the old-style syntax in most cases.

This logic did not handle the lookup of the home page via `.Site.GetPage "section" ""` and similar. This commit fixes that.

Fixes #4989
hugolib/page_collections.go
hugolib/site_sections_test.go