aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/content_map_page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-06-02 12:54:14 +0200
committerBjørn Erik Pedersen <[email protected]>2024-06-02 13:30:52 +0200
commit917199a94ea4d67eb911d3e7e26cd7c828fae323 (patch)
treea2cbd49da9ca1b41040b0b742e92746cc6db508a /hugolib/content_map_page.go
parentc8dac67defbb512877e974814e196782989b8214 (diff)
downloadhugo-917199a94ea4d67eb911d3e7e26cd7c828fae323.tar.gz
hugo-917199a94ea4d67eb911d3e7e26cd7c828fae323.zip
content adapter: Fix site.GetPage using the base part of the path
Fixes #12561
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r--hugolib/content_map_page.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go
index 66baea3d1..a8f5b5fd7 100644
--- a/hugolib/content_map_page.go
+++ b/hugolib/content_map_page.go
@@ -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
},