Skip to content

Changing the versions.json file often does not reflected in version menu for some time #8228

Closed Answered by kamilkrzyskow
anb0s asked this question in Q&A
Discussion options

You must be logged in to vote

Mike is a wrapper around MkDocs, so it could in theory also modify the bundle.js file of the material theme, and replace the versions.json URL with a versions.json?v=latest-available-version URL, which would invalidate the cache immediately like you want after a change.

However, it's probably not the right thing to do, as the maintainer of mike would have to make sure that the override of the versions.json works properly with every mkdocs-material update.

The versions.json also isn't available during the build process for MkDocs to modify the bundle.js with a hook, because we don't know what the latest version is.
However, you could probably make do with a wrapper over mike itself, simila…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by squidfunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants