@gentleduck/md
v0.2.2
Published
Native Rust MDX compiler with a velite-shaped TypeScript API
Maintainers
Readme
Install
pnpm add @gentleduck/mdOptional: @gentleduck/md-sidecar for foreign remark / rehype plugins.
Quick start
// dmc.config.ts
import { defineConfig, s } from "@gentleduck/md";
export default defineConfig({
output: { data: ".gentleduck", html: true },
collections: {
posts: {
name: "Post",
pattern: "content/posts/**/*.mdx",
schema: (s) => s.object({
title: s.string(),
date: s.isodate(),
slug: s.path(),
}),
},
},
});dmc buildOutputs .gentleduck/Post.json + typed index.d.ts. Import from any framework.
Native features
Pretty code (syntect), KaTeX/MathML math, emoji, code imports, npm-command tabs, mermaid, bare URL autolinks, heading autolinks, asset copy.
JS plugins listed in config that have native equivalents
(remark-gfm, rehype-pretty-code, rehype-katex, rehype-slug,
etc) are stripped from the sidecar payload automatically.
Docs
Repo: github.com/gentleeduck/duck-mc
- Per-crate references, architecture, integration guides:
dmc-docs/ - duck-ui website cross-link: github.com/gentleeduck/duck-ui
- Migration from velite:
docs/migrating-from-velite.md
Benchmarks
Five recorded phases; 9.5x velite at the kitchen-sink workload.
Full numbers: duck-benchmarks/.
Contributing
PR checklist + style notes:
CONTRIBUTING.md.
License
MIT
