Knap
graph-knap
Pipe graph props through a graph_* filter; Knap renders Markdown and these filters draw the official fence, or a ::graph-* block.
Install
Three names: Knap is the templating language (pnpm add knap). graph-knap is the filter pack you copy from this registry. graph_* is what you write in templates. Copy the graphs first; all.json already includes the filters.
Command
Knap
Wire
Spread graphFilters into createEngine next to standardFilters. Filters are synchronous. They read context.rawValue so arrays stay arrays. The Knap CLI does not load custom filters.
Engine
Subset
Author
Piped value is the same props object as the React API. A string param is the title. Every docs page has a Knap tab with a copy-paste template, the JSON, and the Markdown it emits.
Template
Format
Default output is the official fenced ASCII. Pass comark to emit a ::graph-* block instead. Flow, Plot, Activity, Heatmap, Calendar, Timer, and Countdown have no ASCII, so they emit Comark YAML unless you only wanted a fence, in which case pick another graph.
Validate
Merge graphFilterMetadata into validateFilters so unknown graph_* names fail the same way unknown standard filters do. Limits, resolvers, and allowRegex stay Knap's.
Editor
Hosts
The result is Markdown. GitHub, Linear, Obsidian, and a README can open the fence. A Comark app can open ::graph-* if you asked for it. obsidianmd/knap is the language; graph-knap is the filter pack.