Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 863 Bytes

File metadata and controls

23 lines (15 loc) · 863 Bytes

@notion-stuff/blocks-html-parser

This is a parser to parse Notion blocks to Markdown. If you're here, you are probably aware of the Notion API, which is currently in beta. Hence, this parser is being updated (trying to) as the Notion API is updated.

Installation

npm install @notion-stuff/blocks-markdown-parser

@notion-stuff/blocks-markdown-parser depends on @notionhq/client

Usage

  1. Get the parser instance with NotionBlocksMarkdownParser.getInstance()
    1. Optionally pass in a NotionBlocksMarkdownParserOptions object to customize the parser. The passed-in option will be merged with the default options.
  2. Call instance.parse(blocks) with blocks being Block[] that you'd get from a Notion page.

Configuration

export interface NotionBlocksMarkdownParserOptions {}