Skip to main content

Replicating Jekyll’s markdownify filter in Nunjucks with Eleventy

Visit external resource

Here, Ed provides some handy code to convert a Markdown-formatted string into HTML in Nunjucks via an Eleventy shortcode.

This performs the same role as the markdownify filter in Jekyll.

I’m now using it on this site in listings, using the shortcode to convert blog entry excerpts written in markdown (which might contain code or italics, etc) into the target HTML.

External Link Bookmark Note Entry Search