okkur / syna

Highly customizable open source theme for Hugo based static websites

Home Page:https://syna.okkur.org/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 /endirectory which does not seem correct:

Bildschirmfoto 2020-04-13 um 21 08 26

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.