mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
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:
committed by
Bjørn Erik Pedersen
parent
fd1f4a7860
commit
b93417aa1d
@@ -244,7 +244,7 @@ Content.
|
||||
b.AssertFileContent("/my/project/public/sv/sect/mybundle/logo.png", "PNG Data")
|
||||
b.AssertFileContent("/my/project/public/nn/sect/mybundle/logo.png", "PNG Data")
|
||||
|
||||
nnSect := nnSite.getPage(KindSection, "sect")
|
||||
nnSect, _ := nnSite.getPage(nil, "sect")
|
||||
assert.NotNil(nnSect)
|
||||
assert.Equal(12, len(nnSect.Pages))
|
||||
nnHome, _ := nnSite.Info.Home()
|
||||
|
Reference in New Issue
Block a user