Eleventy plugin to support TextMate-style syntax highlighting via the Giallo Rust crate.
npm install 11ty-plugin-gialloEleventy plugin to support TextMate-style syntax highlighting via the
Giallo Rust crate.
``js
// eleventy.config.js
import syntaxHighlight from "11ty-plugin-giallo";
export default function (eleventyConfig) {
eleventyConfig.addPlugin(syntaxHighlight, {
themeLight: "github-light",
themeDark: "github-dark",
});
}
`
!block diagram of plugin architecture
Mise-en-place manages dev dependencies and scripts.
`shInstalls dev tools (Rust, Node) and automatically downloads WASI-SDK for the
host architecture.
mise install
Limitations
- Support is currently limited to markdown code blocks. The official Eleventy
syntax highlighting plugin also provides Liquid and Nunjucks tags as well as a
global Javascript function.
- Line highlights and numbers are not yet supported.
- Giallo does not support Prism-style diff format.
Licensing
11ty-plugin-giallo` is distributed under the European Union Public License v.