Multilingual Page bundle inheritance through translationKey?

According to Multilingual > Page Bundle:

To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages

If I am read this correct:

Therefore, from within a template, the page will have access to the files from all linked pages’ bundles.

If I got the following structure

/pl/about/
               index.md
               image.jpg
/en/about
               index.md
               image.jpg

I don’t need to duplicate file image.jpg and just need to have one in main language, however what about when there are two files linked through translationKey?

Probably not if I read this:

Page Bundle resources follow the same language assignment logic as content files, both by file name (image.jpg , image.fr.jpg ) and by directory (english/about/header.jpg , french/about/header.jpg ).

but am I wrong?

As I checked, it don’t as it do not share same basename.

Yeah, this seems to be broken. Although the documentation doesn’t specifically state that page resources are shared when using translationKey in front matter, it is certainly implied.

Reproducible example:

git clone --single-branch -b hugo-forum-topic-46581 https://github.com/jmooring/hugo-testing hugo-forum-topic-46581
cd hugo-forum-topic-46581
hugo server

https://github.com/gohugoio/hugo/issues/11540

2 Likes