https://github.com/vrerv/md-to-notion
An upload of markdown files to a hierarchy of Notion pages.
https://github.com/vrerv/md-to-notion
markdown notion notion-api notion-blocks
Last synced: 2 months ago
JSON representation
An upload of markdown files to a hierarchy of Notion pages.
- Host: GitHub
- URL: https://github.com/vrerv/md-to-notion
- Owner: vrerv
- License: mit
- Created: 2024-08-28T08:47:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-31T09:25:04.000Z (3 months ago)
- Last Synced: 2025-03-31T10:30:47.070Z (3 months ago)
- Topics: markdown, notion, notion-api, notion-blocks
- Language: TypeScript
- Homepage: https://vrerv.notion.site/MD-To-Notion-e85be6990664452b8669c72d989ce258
- Size: 315 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MD to Notion
An upload of markdown files to a hierarchy of Notion pages.

[](https://www.npmjs.com/package/@vrerv/md-to-notion)[🇰🇷 (한êµì–´)](./README_KO.md) | [🇬🇧 (English)](./README.md)
## Features
- Upload markdown files to Notion pages with hierarchy
- Update existing pages if the file name is same. only update changed blocks.
- Replace local link to Notion page link automatically
- Replace local link using custom replacement
- Delete(archive) notion pages that does not exist(deleted files) in local (not to delete by default)## Usage
You need to get Notion API secret and page ID to upload your markdown files.
Follow this [guide](./docs/configure-notion.md) to get the secret and page ID.See [Example Project](./examples/example-project) for live example.
### CLI
```bash
npx @vrerv/md-to-notion --help
```Update all markdown files under the current directory to Notion page
```bash
npx @vrerv/md-to-notion -t -p .
```This project markdown files are also published as Notion pages by this package using [GitHub Actions](./docs/github-actions.md).
You can see the [md-to-notion Notion Page](https://vrerv.notion.site/MD-To-Notion-e85be6990664452b8669c72d989ce258)## Requirements
This package supports the following minimum versions:
- Runtime: `node >= 16`
- Type definitions (optional): `typescript >= 4.5`Earlier versions may still work, but we encourage people building new applications to upgrade to the current stable.
## References
- [notion-sdk-js](https://github.com/makenotion/notion-sdk-js)
- [martian](https://github.com/tryfabric/martian)
- [markdown2notion](https://github.com/Rujuu-prog/markdown2notion) - Initially I tried to use this but need more feature for my use case