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_TOKENandROOT_IDfrom the Notion Setup guide. -
Create the downloader configuration:
Run
npx notion-downloader initand use these options indownloader.jsoncreated:
{
...
"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
.envfile:NOTION_TOKEN=your_token_hereb. Or use it directly with the CLI.
-
Remove the existing content from the
docsfolder. -
Run the downloader:
npx notion-downloader pull