Skip to content

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.

Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this 🐛 fix @sneakers-the-rat !! it looks great running it locally. let's merge. the CI failure has nothing to do with this pr.

@lwasser lwasser changed the title pass env to language session fix: pass env to language session May 8, 2025
@lwasser lwasser merged commit d65dc13 into pyOpenSci:main May 8, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants