mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Fix section page resource not published if resource filename partially matches content file name
Fixes #12198
This commit is contained in:
@@ -485,7 +485,7 @@ func (m *pageMap) forEachResourceInPage(
|
||||
rw.Handle = func(resourceKey string, n contentNodeI, match doctree.DimensionFlag) (bool, error) {
|
||||
if isBranch {
|
||||
ownerKey, _ := m.treePages.LongestPrefixAll(resourceKey)
|
||||
if ownerKey != keyPage {
|
||||
if ownerKey != keyPage && path.Dir(ownerKey) != path.Dir(resourceKey) {
|
||||
// Stop walking downwards, someone else owns this resource.
|
||||
rw.SkipPrefix(ownerKey + "/")
|
||||
return false, nil
|
||||
|
Reference in New Issue
Block a user