v2.5.0
Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
Repository
Current version released
2 years ago
Versions
Notion to Markdown for Deno
Convert notion pages, block and list of blocks to markdown (supports nesting) using notion-sdk-js.
This projet is an adaptation of notion-to-md module for Deno. Credit goes to notion-to-md contributors.
Usage
import NotionToMarkdown from "https://github.com/5ika/notion-to-md-deno/raw/master/mode.ts";
import { Client } from "https://deno.land/x/notion_sdk@v1.0.4/src/mod.ts";
const notion = new Client({auth: NOTION_SECRET});
const n2m = NotionToMarkdown(notion);
const mdblocks = await n2m.pageToMarkdown("target_page_id");
const mdString = n2m.toMarkdownString(mdblocks);
console.log(mdString);
See documentation on notion-to-md project.