Plugins

Code Highlight

This plugin uses the highlight.js library to search and highlight the syntax code of any <pre><code> element. It is disabled by default so to enable it you have to import and use it in the _config.js file:

import codeHighlight from "lume/plugins/code_highlight.ts";

site.use(codeHighlight());

See the highlight.js docs for available config options. Example:

import codeHighlight from "lume/plugins/code_highlight.ts";

site.use(codeHighlight({
  options: {
    classPrefix: "syntax-",
  },
}));