Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoMoretti committed Oct 12, 2024
1 parent a89555c commit 6ddbdb4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
4 changes: 2 additions & 2 deletions apps/www/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const docsConfig: DocsConfig = {
items: [],
},
{
title: "Notion Token",
href: "/docs/notion-token",
title: "Notion Setup",
href: "/docs/notion-setup",
items: [],
},
{
Expand Down
25 changes: 17 additions & 8 deletions apps/www/content/docs/guide/nextra.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,11 @@ npm install notion-downloader
}
}
```
4. Your root Notion object should be a database with a page titled "index". You can start from [this template](https://franciscomoretti.notion.site/11a047149aef80578303e705001bb90e?v=8446592daa4c4e7ab8c2c73cae646e27).

4. Get your NOTION_TOKEN by following the guide in the [Notion Token documentation](https://nextra.site/docs/notion-token).
5. Get your `NOTION_TOKEN` and `ROOT_ID` by following the guide in [Notion Setup](/docs/notion-setup/).

5. Your root Notion object should be a database with a page titled "index". You can start from [this template](https://franciscomoretti.notion.site/11a047149aef80578303e705001bb90e?v=8446592daa4c4e7ab8c2c73cae646e27).

6. Get the `rootId` from your page following the guide in `/notion-root-id.mdx`.


7. Create the downloader configuration:
6. Create the downloader configuration:

1. Run `notion-downloader init`
2. Use the following options in your `downloader.json` file:
Expand Down Expand Up @@ -73,13 +69,26 @@ npm install notion-downloader
}
```


7. **Add your Notion token**
Refer to the [Notion Token Setup](/docs/notion-setup) guide for instructions on obtaining your Notion token. Once you have your token, you can use it in one of two ways:

a. Add it to a `.env` file in your project root:

```bash
NOTION_TOKEN=your_token_here
```

b. Use it directly with the CLI.


8. Run the downloader:

```bash
npm run download
```

9. **Videos:** For compatibility with server rendering, follow the [Video Support guide](https://nextra.site/docs/guide/video).
9. **Videos:** For compatibility with server rendering, follow the [Video Support guide](/docs/guide/video).

10. **Images:** If any images come from external domains, update your `next.config.mjs` file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,19 @@ After creating the integration, you need to give it access to the specific pages
Now your integration can access this page/database and its children.

Remember: You need to add the integration to the root page/database of the tree you want to download.

## Getting your Root ID

Get the ID of the page you want to use as the root of the download.
The downloader will pull all the pages and databases underneath this root.

Each page from notion has a unique ID. To find the ID of the page you want to use as the root of your downloader, you can follow these steps:

1. Open the page in Notion
2. Copy the ID from the URL

The ID is the long string of numbers and letters after `notion.site/` in the URL.

Example: https://notion.so/franciscomoretti/11a047149aef80578303e705001bb90e?v=8446592daa4c4e7ab8c2c73cae646e27

In this case, the root ID is `11a047149aef80578303e705001bb90e`.
15 changes: 9 additions & 6 deletions apps/www/content/docs/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ description: How to use the Notion Downloader.

Follow these steps to use the Notion Downloader:

1. **Initialize your project**
1. Get your `NOTION_TOKEN` and `ROOT_ID` by following the guide in [Notion Setup](/docs/notion-setup/).

2. **Initialize your project**
Run the following command to create a `downloader.json` configuration file:

```bash
Expand All @@ -16,21 +18,22 @@ Follow these steps to use the Notion Downloader:

This will prompt you for the required configuration options and create a `downloader.json` file in your current directory.

2. **Configure downloader.json (Optional)**
3. **Configure downloader.json (Optional)**
If needed, customize your `downloader.json` file by following the [Configuration Guide](/docs/config).

3. **Set up your Notion token**
Refer to the [Notion Token Setup](/docs/notion-token) guide for instructions on obtaining your Notion token. Once you have your token, you can use it in one of two ways:
4. **Add your Notion token**
Refer to the [Notion Token Setup](/docs/notion-setup) guide for instructions on obtaining your Notion token. Once you have your token, you can use it in one of two ways:

a. Add it to a `.env` file in your project root:

```bash
NOTION_TOKEN=your_token_here
```

b. Use it directly with the CLI (see step 4).
b. Use it directly with the CLI (see step 5).


4. **Download your Notion content**
5. **Download your Notion content**
Run one of the following commands to pull your Notion content:

a. If you've set up your token in a `.env` file:
Expand Down

0 comments on commit 6ddbdb4

Please sign in to comment.