Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arpitbhalla/notion2mdblog
Convert notion page📜 to markdown 🔖
https://github.com/arpitbhalla/notion2mdblog
notion notion-blog notion-markdown notion-md notion-sdk notion2blog notion2md
Last synced: 4 months ago
JSON representation
Convert notion page📜 to markdown 🔖
- Host: GitHub
- URL: https://github.com/arpitbhalla/notion2mdblog
- Owner: arpitBhalla
- Created: 2022-01-01T18:13:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T08:12:05.000Z (about 2 years ago)
- Last Synced: 2024-05-02T22:38:11.881Z (10 months ago)
- Topics: notion, notion-blog, notion-markdown, notion-md, notion-sdk, notion2blog, notion2md
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/notion2mdblog
- Size: 11.7 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notion to markdown blog
## Install
```bash
npm install notion2mdblog
``````bash
yarn add notion2mdblog
```## Usage
```typescript
// Client is extended from @notionhq/client
import { Client } from "notion2mdblog";
import fs from "node:fs";// Initializing a client
const notion = new Client({
auth: process.env.NOTION_KEY,
});async function main() {
const blogPages = await notion.markdown.db2md({
database_id: NOTION_DATABASE_ID,
});
blogPages.map((blogPage) => {
fs.writeFileSync(`blogs/${blogPage.title}`, blogPage.content);
});
}
main();
```