CodeMirror 6 language support for decktile
Markdown slide decks (*.deck.md), built as a @lezer/markdown extension.
- YAML frontmatter, highlighted as YAML.
---slide breaks (never read as setext headings).@kicker,@layout,@transitionand other@directives.::: grid {cols=2}/::: cardfences and their attributes.- Code blocks in their own language;
```pdguses @predictygraph/lezer-pdg, the rest comes from@codemirror/language-data.
Mirrors tree-sitter-decktile.
npm install @decktile/lezer-decktileimport { EditorView, basicSetup } from "codemirror";
import { decktile } from "@decktile/lezer-decktile";
new EditorView({ doc: "---\ntitle: Demo\n---\n\n# Hello\n@kicker KubeCon\n", extensions: [basicSetup, decktile()], parent: document.body });Also exported: decktileSyntax (the MarkdownConfig, for your own markdown({ extensions }) setup) and
codeLanguage(info) (the code block language lookup).
npm ci
make check test
DECKS=../talks npm test # also parse every *.deck.md thereRelease: make release V=patch|minor|major tags and pushes; the release workflow publishes to npm.
Apache-2.0