GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Docs: Move inline JavaScript to own file to reduce duplication by hugovk · Pull Request #119541 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented May 25, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
Move inline JavaScript to own file to reduce duplication
534e117
@hugovk hugovk added docs Documentation in the Doc dir needs backport to 3.13 only security fixes labels May 25, 2024
@bedevere-app bedevere-app Bot added the awaiting core review label May 25, 2024
@hugovk hugovk added skip issue skip news labels May 25, 2024
Wulian233
Wulian233 reviewed May 25, 2024
View reviewed changes

@Wulian233 Wulian233 left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/tools/static/rtd_switcher.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233 Wulian233 mentioned this pull request May 25, 2024
Update README and layout.html from 3.13 to 3.14 #119539
Merged
@hugovk
Update indent to match existing
622fdc7
humitos
humitos approved these changes May 27, 2024
View reviewed changes

@humitos humitos left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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! 👍🏼

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hugovk added 2 commits May 27, 2024 16:51
@hugovk
Merge remote-tracking branch 'upstream/main' into rtd-switcher
b35dd09
@hugovk
Fix indent
6ad01db
@hugovk
hugovk enabled auto-merge (squash) May 27, 2024 14:34
@hugovk

hugovk commented May 27, 2024

Copy link
Copy Markdown
Member Author

PR #119607 will fix the doctest.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Merge branch 'main' into rtd-switcher
f37acb7
@hugovk
hugovk merged commit eea26c4 into python:main May 27, 2024
@hugovk
hugovk deleted the rtd-switcher branch May 27, 2024 18:04
@miss-islington-app

miss-islington-app Bot commented May 27, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label May 27, 2024
@miss-islington-app

miss-islington-app Bot commented May 27, 2024

Copy link
Copy Markdown

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned hugovk May 27, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request May 27, 2024
@hugovk
[3.13] Docs: Move inline JavaScript to own file to reduce duplication (…
35f8052
…pythonGH-119541)

(cherry picked from commit eea26c4)

Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-app

bedevere-app Bot commented May 27, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 27, 2024
hugovk added a commit that referenced this pull request May 27, 2024
@hugovk
[3.13] Docs: Move inline JavaScript to own file to reduce duplication (…
0a4a318
…GH-119541) (#119630)
@JelleZijlstra JelleZijlstra mentioned this pull request May 28, 2024
backport a9a74da 3.13 #119642
Closed
@hugovk hugovk added the needs backport to 3.12 only security fixes label Jun 16, 2024
@miss-islington-app

miss-islington-app Bot commented Jun 16, 2024

Copy link
Copy Markdown

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Jun 16, 2024

Copy link
Copy Markdown

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Jun 16, 2024

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk removed the needs backport to 3.12 only security fixes label Jun 16, 2024
@hugovk hugovk mentioned this pull request Jun 16, 2024
[3.12] Docs: remove temporary hardcoded links and move inline JS to own file (GH-120348) #120589
Merged
@humitos humitos mentioned this pull request Jul 16, 2024
Add language and version switchers python/python-docs-theme#193
Open
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@hugovk @estyxx
Docs: Move inline JavaScript to own file to reduce duplication (pytho…
3a0f3c4
…n#119541)
@humitos humitos mentioned this pull request Jul 23, 2024
Generate version selector dynamically via JavaScript python/docsbuild-scripts#179
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@Wulian233 Wulian233 Wulian233 left review comments
@humitos humitos humitos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@hugovk hugovk

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@hugovk @humitos @Wulian233
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.