Prism

Code syntax highlighting using Prism

Installation

Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import prism from "lume/plugins/prism.ts";

const site = lume();

site.use(prism({/* your config here */}));

export default site;

See all available options in Deno Doc.

Description

This plugin uses the Prism library to search and syntax highlight the code of any <pre><code> element.

import lume from "lume/mod.ts";
import prism from "lume/plugins/prism.ts";

const site = lume();

site.use(prism({
  languages: ["md", "js", "css", "rust"], // Load these languages
}));

export default site;