defaultContentLanguageInSubdir=true only works on the homepage #1375
-
I'd like to make my site multilingual-ready, but for now it will only support one language. The idea is to force the default language (English) to use the /en/ path segment. I started out with the default example using this command:
Then followed this guide: https://getdoks.org/docs/guides/i18n/ And this is my content tree (moved everything in /content to /content/en): ![]() With
this is what the homepage looks like: The hero section is different than what one would expect. What is wrong? Edit: seems to be because _index.md needs to be moved from /content/ to /content/en/ Notice how the Docs link in the navbar points to a URL without the /en/. This can be solved by editing menus.en.toml like this:
Not sure if this is the optimal approach, though. Anyway, if I don't make that change in module.toml, I get the expected result. Thanks a lot |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Correct!
You're right, that's not how it's supposed to work. Doks needs to be updated, replacing For now, use (temporary) overwrites:
Example repo: doks-1375 |
Beta Was this translation helpful? Give feedback.
Correct!
You're right, that's not how it's supposed to work. Doks needs to be updated, replacing
{{ .URL | absURL }}
with(this does not work in a production build){{ .URL | absLangURL }}
{{ .URL | relLangURL }}
(this does work in both development and a production build)For now, use (temporary) overwrites:
node_modules/@thulite/doks-core/layouts/_partials/header/header.html
to/layouts/_partials/header/header.html
and do a find and eplace .node_modules/@thulite/doks-…