]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix it so we never auto-fallback to page resources in other roles/versions
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 14 Apr 2026 14:33:38 +0000 (16:33 +0200)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2026 14:33:38 +0000 (16:33 +0200)
commit974772422258f1e8aab1c7603fc09bbb1a2c2571
tree9f3e76121fe6a0baa758cbcc586a4e20cb2430c8
parenta17bdbc5face02ed2470895bcbfe67db7749dc73
Fix it so we never auto-fallback to page resources in other roles/versions

This is some logic that's left behind from when we had only one dimension (language) where the common case would be to have one resource set (e.g. an image) and many content translation.

After this commit:

* For sites matrix defined in the content filename (e.g. data.en.js) or in its mount definition, we may use that as a fallback for e.g. German languages if we don't find a better match.
* For content adapters, this is not relevant: Here you must be explicit about this.
* We never auto-fallback on resources from a role/version to another.
* When a page bundle spans multiple roles (e.g. via roles = "*"), we clone its resources to all roles so each gets role-specific paths.

Fixes #14749
Fixes #14752
hugofs/fileinfo.go
hugolib/content_map.go
hugolib/content_map_page.go
hugolib/content_map_page_assembler.go
hugolib/sitesmatrix/dimensions.go
hugolib/sitesmatrix/sitematrix_integration_test.go
resources/page/pagemeta/page_frontmatter.go