Javascript assets 404s when using multilingual mode
kaistierl opened this issue · comments
Is this a BUG REPORT or FEATURE REQUEST?:
bug
What happened:
I have following multilanguage config:
languageCode = "de"
DefaultContentLanguage = "de"
[languages]
[languages.de]
languageName = "Deutsch"
title = "MyPage"
weight = 2
[languages.en]
languageName = "English"
title = "MyPage (English)"
weight = 1
Everything is working fine so far, translated content is displayed but the Javascript assets cannot get loaded on the english page. I got 404s for all javascript files. Therefore, collapsible menu and "back to top" button do not work on the translated page.
Browser searches these assets inside the /en
directory which does not seem correct:
What you expected to happen:
Obviously, the javascript assets should also be loaded on translated pages. They should be gotten from /scripts
instead of /en/scripts
How to reproduce it (as minimally and precisely as possible):
Hopefully, this is easily reproducible for all multi-language sites when my config snippet is used
Anything else we need to know?:
Loosely related to #708 and #710 but setting
RelativeURLs = true
CanonifyURLs = true
did not help
Environment:
- Syna Theme version:
v0.16.2
- Hugo version:
Hugo Static Site Generator v0.68.3/extended darwin/amd64 BuildDate: unknown
- Others:
...sorry, just saw #732 - this fixes it.