Skip to content

Commit

Permalink
Merge pull request matplotlib#25286 from tacaswell/doc/cachebust_swit…
Browse files Browse the repository at this point in the history
…cher

DOC: add cache-busting query to switcher json url
  • Loading branch information
ksunden authored Feb 22, 2023
2 parents f16c00b + 1feb029 commit 934951f
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 934951f

Please sign in to comment.