mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-02 22:52:51 +02:00
content adapter: Fix site.GetPage using the base part of the path
Fixes #12561
This commit is contained in:
@@ -932,8 +932,8 @@ func newPageMap(i int, s *Site, mcache *dynacache.Cache, pageTrees *pageTrees) *
|
||||
LockType: doctree.LockTypeRead,
|
||||
Handle: func(s string, n contentNodeI, match doctree.DimensionFlag) (bool, error) {
|
||||
p := n.(*pageState)
|
||||
if p.File() != nil {
|
||||
add(p.File().FileInfo().Meta().PathInfo.BaseNameNoIdentifier(), p)
|
||||
if p.PathInfo() != nil {
|
||||
add(p.PathInfo().BaseNameNoIdentifier(), p)
|
||||
}
|
||||
return false, nil
|
||||
},
|
||||
|
Reference in New Issue
Block a user