@lesto/content-markdown
v0.1.7
Published
Markdown rendering for Docks content collections
Maintainers
Readme
@lesto/content-markdown
Markdown rendering for Docks content collections.
Installation
npm install @lesto/content-markdownQuick Start
import { render } from "@lesto/content-markdown";
const result = await render("# Hello World");
console.log(result.html);
// <h1 id="hello-world">Hello World</h1>Features
- Syntax highlighting with Shiki
- GitHub Flavored Markdown support
- Auto-generated heading IDs
- Copy buttons for code blocks
- Reading time calculation
- Heading extraction for table of contents
Render Options
const result = await render(content, {
syntaxHighlighting: true,
copyButtons: true,
sanitize: true,
});
result.html; // Rendered HTML
result.headings; // Extracted headings
result.readingTime; // { minutes, words }Documentation
Full documentation at usedocks.dev
License
MIT
