@nast/nast2mdast
v0.2.0
Published
Convert NAST (Notion AST) to mdast (Markdown AST)
Readme
nast2mdast
It is a very simple and minimal transformation which can be summed up into 2 main things:
- Notion block types (like Callout, File, Embed and similar) that are not present in mdast get transformed to simpler types (like Paragraph, Link, BlockQoute or similar), and a
originalTypeproperty gets added (along other rellevant information of the original block) to thedataobject of the new simple block. - The root node
datawhich is the page title, page icon and so on, gets converted to YAML values and added as a first (head block) with type "yaml" (remark frontmatter mdast spec).
Usage
It's main use is in the package mdast2md, this package is sort of an intermediate step between nast and markdown.
