11ty makes use of filters which are a way to modify content on the fly in your templates.
If you’d like to add your own filters, checkout out Extending 11ty.
Render a markdown-formatted string into HTML.
{{ "This is a **markdown** string" | md }}
<!-- <p>This is a <strong>markdown</strong> string</p> -->
Essentially identical to md, but doesn’t wrap paragraphs in <p>
tags.
Usually you don’t want this, but it can be useful in situations where you want bold or italic text, or links, but don’t want the additional markup/styling of a <p>
(i.e. figcaption
).
{{ "This is a **markdown** string" | md_inline }}
<!-- This is a <strong>markdown</strong> string -->
Generates a url to an asset on Cloudinary. You can pass arguments to it that are equal to transforms as described in Cloudinary’s Node SDK.
{{ 'image.jpg' | img([{ width: 470 }]) }}