@breadio/markdown
TypeScript icon, indicating that this package has built-in type declarations

0.0.2-beta.3 • Public • Published

@breadio/markdown

version License CI

Markdown parser and renderer for Breadio.

  • [x] Simple remark parser
  • [x] Frontmatter yaml parser
  • [x] Headings id
  • [x] Support raw html
  • [x] Support use jsx custom components
  • [x] Support write JSON to provide data to jsx
  • [ ] More options (follow remark-markdown)
  • [ ] Extract metadata
  • [ ] Extract content toc
  • [ ] Extract content links
  • [ ] Modify footnote options passing in micromark-extension-gfm

Design

Breadio uses an extended markdown syntax to render the content.

It supports the following well-known markdown features:

  • Standard markdown syntax
  • GitHub Flavored Markdown
  • Frontmatter
  • Headings ID
  • Use raw html powered by JSX
  • Use components imported outside
    • Provide props with JSON
    • Provide slots with all the markdown features

What's the difference with mdx? We remove any dynamic features from mdx. We can only use JSON in JSX.

Credits

This package is highly modified from mdx, remark and its ecosystem.

License

MIT License © 2023 XLor

Package Sidebar

Install

npm i @breadio/markdown

Weekly Downloads

2

Version

0.0.2-beta.3

License

MIT

Unpacked Size

463 kB

Total Files

39

Last publish

Collaborators

  • yjl9903