Skip to content
yambPublic

About

Markdown parser for Yamb

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@meritt/yamb-markdown

npm version Build status Coverage status Dependency status

Parse source Markdown into editable tokens, render HTML, then derive sanitized page HTML, feed HTML and plain text for Yamb.

For GitHub Packages, route the @yamb scope to https://npm.pkg.github.com and install @yamb/markdown.

Quick start

Requires Node.js 26.13 or later and yamb.

pnpm add yamb @meritt/yamb-markdown
import { markdown } from '@meritt/yamb-markdown';
import { prepare } from 'yamb/transform';

await using md = markdown();

const stages = [md, md.html(), md.clean()];

const source = {
  uri: '2026/11/guide',
  title: 'Guide',
  text: 'An **example** with [a link](./next).'
};

const prepared = await prepare(source, stages, {
  base: new URL('https://example.com/blog'),
  timeZone: 'UTC'
});

console.log(prepared.text.html);
console.log(prepared.text.plain);

For a live Post, pass post.toJSON().

Reference

Author

Alexey Simonenko

License

MIT. See LICENSE.

About

Markdown parser for Yamb

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages