DocumenterVitepress.jl icon indicating copy to clipboard operation
DocumenterVitepress.jl copied to clipboard

test versioning

Open lazarusA opened this issue 1 year ago • 3 comments

test button

lazarusA avatar Feb 24 '24 19:02 lazarusA

Code can be run client-side by wrapping it in a client-only div as in https://vitepress.dev/reference/runtime-api#clientonly

asinghvi17 avatar Feb 29 '24 16:02 asinghvi17

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.

asinghvi17 avatar Apr 03 '24 15:04 asinghvi17

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.

asinghvi17 avatar May 17 '24 03:05 asinghvi17

new solution, WIP, https://github.com/LuxDL/DocumenterVitepress.jl/pull/178

lazarusA avatar Sep 18 '24 07:09 lazarusA