A pack of Eleventy plugins for syntax highlighting in Markdown, Liquid, and Nunjucks templates.
eleventy-plugin-syntaxhighlight is a collection of Eleventy plugins designed to provide syntax highlighting functionality. Unlike many syntax highlighting plugins, eleventy-plugin-syntaxhighlight does not rely on browser or client-side JavaScript. Instead, all syntax highlighting transformations are performed at build-time. This allows for more efficient and lightweight rendering.
To install eleventy-plugin-syntaxhighlight, follow these steps:
npm install --save eleventy-plugin-syntaxhighlight
// .eleventy.js
const syntaxHighlight = require('eleventy-plugin-syntaxhighlight');
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(syntaxHighlight);
};
eleventy-plugin-syntaxhighlight is a set of Eleventy plugins that provide efficient and build-time syntax highlighting without relying on client-side JavaScript. With easy integration into the Eleventy workflow, support for multiple programming languages, and lightweight rendering, this plugin offers a practical solution for incorporating syntax highlighting into Eleventy-powered websites.