Add to your Cargo.toml :
Script tag (zero config)
Add this to your HTML and all
blocks get highlighted automatically:
< script src =" https://cdn.jsdelivr.net/npm/@arborium/arborium@1/dist/arborium.iife.js " > script >
Your code blocks should look like this:
< pre >< code class =" language-rust " > fn main() {} code > pre > < pre >< code data-lang =" rust " > fn main() {} code > pre > < pre >< code > fn main() {} code > pre >
Configure via data attributes:
< script src =" ... " data-theme =" github-light " data-selector =" pre code " data-manual data-cdn =" unpkg " > script >
With data-manual , call window.arborium.highlightAll() when ready.
See the IIFE demo →