Docs
Docusaurus
Docusaurus
How to use Notion Downloader with Docusaurus.
-
Follow the instructions in the Docusaurus guide to install Docusaurus.
-
Install
notion-downloader
:
npm install notion-downloader
-
Get your
NOTION_TOKEN
andROOT_ID
from the Notion Setup guide. -
Create the downloader configuration:
Run
npx notion-downloader init
and use these options indownloader.json
created:
{
...
"rootObjectType": "database",
"conversion": {
...
"markdownExtension": "mdx",
"outputPaths": {
"markdown": "./docs",
"assets": "./static"
},
"namingStrategy": {
"markdown": "githubSlug",
"assets": "default"
},
"layoutStrategy": "hierarchical",
"frontmatter": {
"emptyFieldStrategy": "skip"
}
...
}
...
}
-
Add your Notion token:
a. In a
.env
file:NOTION_TOKEN=your_token_here
b. Or use it directly with the CLI.
-
Remove the existing content from the
docs
folder. -
Run the downloader:
npx notion-downloader pull