Open thofma opened 4 months ago
I think that would be as simple as adding a JavaScript selector, since the structure of the folders is the same as what Documenter.jl usually generates (dev, stable, v*, previews/PR*
).
The big issue here is that I need this to evaluate the items in versions.js
at the root of gh-pages
, preferably every time a client loads this. If there are any JavaScript/Vue.js wizards here, do you know of a good solution to create a Vue component which can do that, and render on the client side (not server-side)?
https://stackoverflow.com/questions/39022630/how-to-display-an-array-to-a-html-sidebar-in-google-apps-script shows how to get a JS script done for Google Script but the outcome should be clear enough for Vitepress also. We might want to use either nav-bar-content-after
or nav-bar-content-before
as the positioning for this component which would be built as a Vue component and use a ClientOnly
tag.
In general, this will complicate the DV setup significantly, so it may be best to release this DocumenterJLVersionSelector
component as a npm package. I have no idea how to set something like that up, though.
Is there a way to enable a version selector for the different package versions? The documentation of DocumenterVitepress.jl itself seem to link only to
/dev/
, but what about other versions?FWIW, for mkdocs one could something to work using https://github.com/jimporter/mike.