0

Infrequently Noted · 28d · discuss

An excellent feature of Eleventy1 is the @11ty/eleventy-plugin-syntaxhighlight plugin, which adds build-time syntax highlighting support via PrismJS. Official support keeps 11ty sites from worrying about client-side bloat from JS-based highlighters and the common failure mode of over-including language definitions.2 But nothing's perfect. ContentsLilliputian Adventures In Line NumberingGreener Pastures The official plugin integrates naturally, and I took to using it via the usual triple-backtick markdown syntax: # The Usual Markdown Nonsense { #the-usual-nonsense } And now for something entirely different: ```js function yourCodeHere() { /* ... */ } ``` Etc., etc. This works a treat, until you want a bit more...