Skip to content
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

Docs: Move inline JavaScript to own file to reduce duplication #119541

Merged
merged 5 commits into from
May 27, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 25, 2024

Follow on from #116966.

Move the language/version switcher JavaScript from the layout.html template, which meant it was included in the header of every page, and into its own JavaScript file to reduce duplication.

This reduces the size of the entire docs HTML (Doc/build/html) from 69.7 MB to 68.2 MB.

cc @humitos


📚 Documentation preview 📚: https://cpython-previews--119541.org.readthedocs.build/

@hugovk hugovk added docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes labels May 25, 2024
Copy link
Contributor

@Wulian233 Wulian233 left a comment

Choose a reason for hiding this comment

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

My PR added 3.14 in layout.html which conflicts with the change of this PR

Doc/tools/static/rtd_switcher.js Show resolved Hide resolved
Copy link
Contributor

@humitos humitos left a comment

Choose a reason for hiding this comment

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

This PR makes sense and looks good to me! 👍🏼

@hugovk hugovk enabled auto-merge (squash) May 27, 2024 14:34
@hugovk
Copy link
Member Author

hugovk commented May 27, 2024

PR #119607 will fix the doctest.

@hugovk hugovk merged commit eea26c4 into python:main May 27, 2024
25 checks passed
@hugovk hugovk deleted the rtd-switcher branch May 27, 2024 18:04
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker eea26c4a731ff9547d48a6761b209fee3f2f84df 3.13

hugovk added a commit to hugovk/cpython that referenced this pull request May 27, 2024
…pythonGH-119541)

(cherry picked from commit eea26c4)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2024

GH-119630 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 27, 2024
@hugovk hugovk added the needs backport to 3.12 bug and security fixes label Jun 16, 2024
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker eea26c4a731ff9547d48a6761b209fee3f2f84df 3.12

@hugovk
Copy link
Member Author

hugovk commented Jun 16, 2024

I'll include this 3.12 backport in the #120348 backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants