-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Admonition Blocks extension #472
Comments
@mhanberg I think it would be great if you want to contribute that. It is on my list to contribute it in the next couple of months if someone else hasn't beaten me to it. I have thought about it some, so here are a couple thoughts on the implementation. I think if we can leverage off of the actual block quote parsing, we will actually be able to use an alert anyplace a block quote can be used, which would end up being usable in many more places than the current GitHub implementation. There are quite a few complaints about these limitation in the discussion thread, https://github.com/orgs/community/discussions/16925. I also think we should allow the overriding of the alert text by allowing any text following the key phrase to be used as the title. For example
would use I haven't given it enough thought yet, but I wonder if there isn't a more semantic way to represent it - maybe using a header tag for the title. |
I'll take a crack, thank you for your thoughts! |
It turns out that the bindings for comrak that I use (MDEx) introduced a new API that will allow me to implement admonition blocks in user space, so I won't need to work on this for now, but it would obviously be better if it was builtin, in case someone else wants to tackle it! |
Oh cool, glad you can do it in your own context. And thanks for posting back here - I may tackle it when I have some time. |
marmite currently uses comrak. Having callouts would be a great feature to have in a blog post. |
Description
It would be great to be able to create admonition blocks, similar to how you can on GitHub
On GitHub is currently produces HTML that looks like
Rendering an SVG is much too opinionated, but I feel that rendering a div with two p tags inside and appropriate class names to style would work well.
I am interested in contributing this feature as long as there is upstream interest, thank you!
The text was updated successfully, but these errors were encountered: