From b93417aa1d3d38a9e56bad25937e0e638a113faf Mon Sep 17 00:00:00 2001 From: Vas Sudanagunta Date: Tue, 29 May 2018 21:35:27 -0400 Subject: 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 --- hugolib/site_output_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hugolib/site_output_test.go') diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index 0677dfbfb..8c9aa113a 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -150,7 +150,7 @@ Len Pages: {{ .Kind }} {{ len .Site.RegularPages }} Page Number: {{ .Paginator.P s := h.Sites[0] require.Equal(t, "en", s.Language.Lang) - home := s.getPage(KindHome) + home, _ := s.getPage(nil, "/") require.NotNil(t, home) @@ -325,7 +325,7 @@ baseName = "customdelimbase" th.assertFileContent("public/customdelimbase_del", "custom delim") s := h.Sites[0] - home := s.getPage(KindHome) + home, _ := s.getPage(nil, "/") require.NotNil(t, home) outputs := home.OutputFormats() -- cgit v1.2.3