- Cargo.toml: Add tree-sitter-highlight + grammar crates (rust, bash, json). TOML dropped due to API incompatibility. - src/highlight.rs: Language enum, highlight_code() function, 4 unit tests covering parsing and HTML generation. - Uses static HTML_ATTRS array for zero-allocation rendering.
20 lines
428 B
TOML
20 lines
428 B
TOML
[package]
|
|
description = "Bespoke static site compiler for nrd.sh"
|
|
edition = "2024"
|
|
license = "MIT"
|
|
name = "nrd-sh"
|
|
version = "0.1.0"
|
|
|
|
[dependencies]
|
|
gray_matter = "0.2"
|
|
maud = "0.26"
|
|
pulldown-cmark = "0.12"
|
|
thiserror = "2"
|
|
walkdir = "2"
|
|
|
|
# Syntax highlighting
|
|
tree-sitter-bash = "0.23"
|
|
tree-sitter-highlight = "0.24"
|
|
tree-sitter-json = "0.24"
|
|
tree-sitter-rust = "0.23"
|