content adapter: Fix site.GetPage using the base part of the path

Fixes #12561
This commit is contained in:
Bjørn Erik Pedersen
2024-06-02 12:54:14 +02:00
parent c8dac67def
commit 917199a94e
2 changed files with 35 additions and 2 deletions

View File

@@ -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
},