Skip to content

🐛 Language switcher loses track of base url #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lwasser opened this issue May 1, 2025 · 2 comments · Fixed by #482
Closed

🐛 Language switcher loses track of base url #476

lwasser opened this issue May 1, 2025 · 2 comments · Fixed by #482

Comments

@lwasser
Copy link
Member

lwasser commented May 1, 2025

When you use the language switcher for our packaging guide, it somehow loses track of the baseurl which should be:

pyopensci.org/python-package-guide

This then cases a 404 or sends the user to the website instead of the packaging guide landing page.

Also spanish is only available after clicking to japanese but you can never actually see it rendered in spanish using the dropdown.

See below:

Image

@sneakers-the-rat
Copy link
Contributor

Oh hmm. Looks like it might be related to the somewhat convoluted path the SPHINX_ENV var takes.

Currently only Japanese is configured to be built in prod:

release_languages = ["ja"]

So not showing Spanish in the English version is correct, showing Spanish from the Japanese version is a bug that looks like results from SPHINX_ENV=production not propagating from the root nox action.

And then since the other languages are being built in dev mode, they don't include the baseurl because when working on a language locally you can't use the baseurl for obvious reasons:

html_baseurl = "/"

@lwasser
Copy link
Member Author

lwasser commented May 7, 2025

Oh so you think it's a NOX session issue?! that makes sense. let me try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants