summaryrefslogtreecommitdiffstats
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
authorVas Sudanagunta <vas@commonkarma.org>2018-05-29 21:35:27 -0400
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-07-18 00:07:20 +0200
commitb93417aa1d3d38a9e56bad25937e0e638a113faf (patch)
tree86d0ab6972b845b81204516c2716c597e851c03c /hugolib/site_url_test.go
parentfd1f4a7860c4b989865b47c727239cf924a52fa4 (diff)
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
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index 5b9d19e0d..fff75bda5 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -117,12 +117,12 @@ Do not go gentle into that good night.
assert.Len(s.RegularPages, 2)
- notUgly := s.getPage(KindPage, "sect1/p1.md")
+ notUgly, _ := s.getPage(nil, "sect1/p1.md")
assert.NotNil(notUgly)
assert.Equal("sect1", notUgly.Section())
assert.Equal("/sect1/p1/", notUgly.RelPermalink())
- ugly := s.getPage(KindPage, "sect2/p2.md")
+ ugly, _ := s.getPage(nil, "sect2/p2.md")
assert.NotNil(ugly)
assert.Equal("sect2", ugly.Section())
assert.Equal("/sect2/p2.html", ugly.RelPermalink())
@@ -175,7 +175,7 @@ Do not go gentle into that good night.
assert.Len(s.RegularPages, 10)
- sect1 := s.getPage(KindSection, "sect1")
+ sect1, _ := s.getPage(nil, "sect1")
assert.NotNil(sect1)
assert.Equal("/ss1/", sect1.RelPermalink())
th.assertFileContent(filepath.Join("public", "ss1", "index.html"), "P1|URL: /ss1/|Next: /ss1/page/2/")