MarkdownMesh
MarkdownMesh is a not-for-profit mission for Markdown.
Tech goals include creating and maintaining:
- a Markdown engine (command-line tool + library + text editor extensions) that is simple, secure, extensible, observable, free/libre, and blazingly fast
- a collection of similarly-adjective'd Markdown plugins/extensions — both by creating new plugins and by reviewing / summarizing / optimizing / Zig-porting existing ones
Other goals include:
- helping more people learn more about Markdown and available tools
- helping notes connect with each other and with people
Command-line tool
cat foo.md | mm html-fragment > foo.html
cat foo.md | mm html-page > foo.html
cat foo.md | mm ast-json > foo.json
zip -0 -r - md/ | mm zip2zip > website-build.zip
cd md/ && mm live-preview
Further reading:
Language extensions
I consider the CommonMark+GFM Spec to be the primary definition of Markdown today.
Any further language extensions are off by default in this engine, but you can opt into them via plugins, e.g.
Plugin | Example | Result |
---|---|---|
math | $S_1 \cap S_2$ | |
footnotes | …[^foo]. … [^foo]: … | |
mdx-subset | <SomeWidget … /> | |
import-markdown | !![](../foo.md#bar):firstP | Inline a copy of the first paragraph of section Bar from doc Foo |
import-code | !![](../src/code.py#foo) | Inline a copy of the function definition foo from code.py as a CodeBlock whose info_string is py |
Plugins
- Creating plugins (in Python or Zig)
- Authz beyond the WASM sandbox
(off by default, very-specific authz scopes)
List of plugins:
- ...for importing (Markdown, code…)
- ...for code (styling, lang/meta for inlines…)
- ...for external tooling
(clip via IIIF, render/run/viz code…) - ...for language exts (footnotes, math…)
- ...for metadata
(including full semantic annotation) - ...for other web stuff
(MDX, assets, templates…) - ...for social (RSS,
og:*
previews…) - ...for Unicode
- ...for validation / static analysis
- ...for tables of contents / search indexes
- ...for polyfilling various things that I wish browsers already had available for JavaScript-less use
Concepts
Doc | One Markdown document. |
Docset | A set of Docs, e.g. from folders or .zip files of |
Section | A subset of a Doc that contains a Heading followed by the content associated with it (including subsections). |
Post | You can consider some Docs or Sections to be "Post"s. This concept is relevant only for some post-related plugins, e.g. rss, signatures, etc. |
Syntax tree | a.k.a. "AST", — this is a tree of Elements that code gets parsed to. |
Element | For Markdown code, syntax tree elements include Link, CodeBlock, etc. |
Engine status
- Phase 1: under construction, with transparency (publishing documentation, benchmarks, and green test coverage)
- Phase 2: WASM-available
(with command-line and JS wrappers) - Phase 3: FLOSS