Skip to content

pass env to language session #482

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sneakers-the-rat
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat commented May 8, 2025

Fix: #476

simple enough - just passing the production env to the language building step.

edit: no longer true changes the production baseurl to be the absolute path rather than the full URL - should be same behavior when deployed, but when testing locally it otherwise would have sent you to the live site rather than the local version.

since this session is intended for deployment, and in deployment we are under the python-package-guide/ path, when previewing this you would need to move the build output from _build/html to _build/html/python-package-guide (if you are e.g. launching http-server from _build/html). this shoudln't be a problem in practice since you shouldn't need to directly preview the production build all that often, and the docs-live-lang/s envs are for development.

Since sphinx uses html_baseurl and we were overloading it, split out the lang selector base path in to a different variable.

@sneakers-the-rat
Copy link
Contributor Author

i also noticed we were building the translated pages twice in build_release_languages? the calls ended up being identical, so i just removed one

@sneakers-the-rat
Copy link
Contributor Author

ope guess the link checker needs the subpath to be correct. if that's the case we also must have been improperly checking before (checking if the links exist on the deployed site)

@sneakers-the-rat
Copy link
Contributor Author

sneakers-the-rat commented May 8, 2025

it's the damndest thing - when i build the docs locally (fresh everything) in prod, i get correct footnote rendering. but in both the preview (which uses the docs nox env) and the prod version that the link checker is evaluating (docs-test), the footnote itself renders, but the thing it links back to does not, e.g. see the footnote that should follow "MIT" and "BSD-3" here: https://output.circle-artifacts.com/output/job/7cd9e0d3-44d4-4045-8270-39bd91465636/artifacts/0/html/ja/tutorials/add-license-coc.html

that should be unrelated to the changes here, as those are all in-page links.

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 this pull request may close these issues.

🐛 Language switcher loses track of base url
1 participant