Skip to content

Commit

Permalink
DOC: add cache-busting query to switcher json url
Browse files Browse the repository at this point in the history
This will ensure that the switcher is promptly updated when we push updates to
the devdocs.
  • Loading branch information
tacaswell committed Feb 22, 2023
1 parent f8ffce6 commit 1feb029
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,11 @@ def js_tag_with_cache_busting(js):
"collapse_navigation": not is_release_build,
"show_prev_next": False,
"switcher": {
"json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
# Add a unique query to the switcher.json url. This will be ignored by
# the server, but will be used as part of the key for caching by browsers
# so when we do a new minor release the switcher will update "promptly" on
# the stable and devdocs.
"json_url": f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}",
"version_match": (
# The start version to show. This must be in switcher.json.
# We either go to 'stable' or to 'devdocs'
Expand Down

0 comments on commit 1feb029

Please sign in to comment.