Replies: 4 comments 7 replies
-
This is really useful, Just a couple of other points to note for a minimal working example:
Build your Jupyter Book in the normal way. |
Beta Was this translation helpful? Give feedback.
-
Is there a similarly simple recipe for adding support to |
Beta Was this translation helpful? Give feedback.
-
In light of recent developments re: colon fences and colon divs, and the issue of custom admonition titles, I hacked my parser to support the following syntax:
Of course the hack does nothing but change the directive to Anyway it seems the framework really needs a more fluid mechanism for admonitions not foreseen in the spec. Maybe this could be the way? |
Beta Was this translation helpful? Give feedback.
-
@choldgraf Where am I supposed to put the following code you mentioned? Which directory?
|
Beta Was this translation helpful? Give feedback.
-
Description
Sometimes you want to be able to quickly define a new admonition that you plan to use throughout your documentation. For example, you might want to do this:
However, the
{example}
directive doesn't exist, so the only way to do this is via a custom{admonition}
directive, like so:This is fine, but tedious, especially if you need to do this many times in your documentation.
Quickly define your own admonition directive
It is possible to quickly define your own directive that you can re-use throughout. Here's the minimal code that accomplishes the directive in the first example:
This will allow you to do:
This results in:
Just thought I'd share here in case others found it useful, and as a reference that we can document if we get around to it (cc @mmcky )
Beta Was this translation helpful? Give feedback.
All reactions