Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compat admonition blocks need to be rendered somehow #95

Open
asinghvi17 opened this issue Apr 1, 2024 · 4 comments · Fixed by #103
Open

compat admonition blocks need to be rendered somehow #95

asinghvi17 opened this issue Apr 1, 2024 · 4 comments · Fixed by #103
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@asinghvi17
Copy link
Collaborator

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
Copy link
Collaborator

lazarusA commented Apr 2, 2024

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
Copy link
Collaborator Author

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
Copy link
Collaborator

lazarusA commented Apr 2, 2024

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
Copy link
Collaborator Author

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.

@asinghvi17 asinghvi17 reopened this Apr 2, 2024
@asinghvi17 asinghvi17 added the help wanted Extra attention is needed label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants