Unify page lookups

This commit unifies the core internal page index for all page kinds.

This enables the `ref` and `relref` shortcodes to support all pages kinds, and adds a new page-relative  `.GetPage` method with simplified signature.

See #4147
See #4727
See #4728
See #4728
See #4726
See #4652
This commit is contained in:
Vas Sudanagunta
2018-05-29 21:35:27 -04:00
committed by Bjørn Erik Pedersen
parent fd1f4a7860
commit b93417aa1d
16 changed files with 294 additions and 153 deletions

View File

@@ -687,7 +687,7 @@ NotFound: {{< thisDoesNotExist >}}
require.Len(t, h.Sites, 1)
s := h.Sites[0]
home := s.getPage(KindHome)
home, _ := s.getPage(nil, "/")
require.NotNil(t, home)
require.Len(t, home.outputFormats, 3)