DocumenterVitepress.jl
DocumenterVitepress.jl copied to clipboard
test versioning
test button
Code can be run client-side by wrapping it in a client-only div as in https://vitepress.dev/reference/runtime-api#clientonly
I finally figured out how Documenter does this - it injects into <head> a script src="../siteinfo.js", so that the doc versions are loaded then and there.
https://github.com/JuliaDocs/Documenter.jl/blob/4fe9cf1237293c530633bcf0ef183b48417f23d7/src/html/HTMLWriter.jl#L999
So at least we know what they do. We could probably build a Vue component from this, I think.
We could include the Documenter version JS as a local script, then deploy a version selector based on that...probably wrapped in a ClientOnly block.
new solution, WIP, https://github.com/LuxDL/DocumenterVitepress.jl/pull/178