I want to either write or handle admonition blocks without shortcodes, so that I can use an editor like Typora a little more easily for preview. I’ve found some topics and read the docs but not clear on process.
Is there any quick guide to what I’d need to do or if it’s even possible without doing a custom hugo build?
>Able was I ere I Elba.
{class="admonition admonition-warning"}
To enable this capability in your site configuration:
[markup.goldmark.parser.attribute]
block = true
You could also use JS to change the structure (e.g., wrap in a <div>, add a title, etc.) by targeting the class, and pass additional data (e.g., title, label) in the blockquote’s data attributes.
>Able was I ere I Elba.
{class="admonition admonition-warning" data-title="This is a Warning" data-label="My Label"}