-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think you pretty much got it. I'd use a paired shortcode, like https://www.11ty.dev/docs/languages/nunjucks/#paired-shortcode So it would look something like your example: {% callout "info" %}
This could be some HTML or Markdown content.
<p>This would be incompatible with using the apex <code>example.com</code> for other purposes, e.g. for the <i>Personal/Organization</i> example discussed before.</p>
{% endcallout %} And maybe your Here's the code that the 11ty-website used [prior to the webc conversion]: But that's probably easier than trying to figure out how to shim something like https://www.npmjs.com/package/markdown-it-admonition into your project and make it work w/ Nunjucks instead of just Markdown. |
Beta Was this translation helpful? Give feedback.
I think you pretty much got it. I'd use a paired shortcode, like https://www.11ty.dev/docs/languages/nunjucks/#paired-shortcode
So it would look something like your example:
And maybe your
callout
shortcode wraps the content in an<aside>
tag and displays the "Info" label/icon based on the level that you pass to the shortcode. Or some extra error checking to throw errors if you pass an invalid level/severity (like "warn" instead of "warning",…