I tried using blockquotes with GitHub-style tags and noticed that Zola doesn’t support this feature.
After looking at the pulldown-cmark
source code, I saw that it already supports this feature, but it needs to be enabled with the pulldown_cmark::Options::ENABLE_GFM
option in the parser.
From the pulldown-cmark
docs:
/// Misc GitHub Flavored Markdown features not supported in CommonMark.
/// The following features are currently behind this tag:
/// - Blockquote tags ([!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION]).
const ENABLE_GFM = 1 << 11;
This enables rendering like the following:
> [!NOTE]
> Note blockquote
to:
<blockquote class="markdown-alert-note"><p>Note blockquote</p></blockquote>
Full specs here.
I tried enabling it in markdown::markdown::markdown_to_html
with just:
/// ...
opts.insert(Options::ENABLE_GFM);
and it seems to work correctly.
I was wondering if it would be possible to add this feature to Zola, so I asked here before opening a PR.