LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
63 stars 9 forks source link

`compat` admonition blocks need to be rendered somehow #95

Open asinghvi17 opened 3 months ago

asinghvi17 commented 3 months ago

Apparently this is a thing...

!!! compat Julia 1.11

    Scoped values were introduced in Julia 1.11. In Julia 1.8+ a compatible implementation is available from the package         
    ScopedValues.jl.
lazarusA commented 3 months ago

not sure this is resolve. In principle we could defined a custom admonition, i.e. ::: compat ..... And the issue is that if this given name is not in default list, then it would default back to tip, which is not ideal.

asinghvi17 commented 3 months ago

This behaviour mimics the Julia markdown parser and Documenter.jl. This preserves parity with current Documenter behaviour so users aren't confused as well.

If we do define a custom admonition it would be done in DocumenterVitepress in any case, at which point one can easily change this code to allow compat admonitions.

lazarusA commented 3 months ago

It looks like the compat admonition is different from tip. But, for now this is a very good way to move forward. And yes, the creation will need to happen at the vitepress level.

https://documenter.juliadocs.org/stable/showcase/#Compat-admonition

asinghvi17 commented 3 months ago

Good point! I guess we could add some CSS for that? The current styling seems to be:

<div class="tip custom-block">

so somehow making "compat custom-block" inherit from "tip custom-block" in CSS and changing the colors ought to work.