Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuma-nama/fumadocs-notion
An example of Fumadocs using Notion
https://github.com/fuma-nama/fumadocs-notion
docs fumadocs nextjs notion
Last synced: about 1 month ago
JSON representation
An example of Fumadocs using Notion
- Host: GitHub
- URL: https://github.com/fuma-nama/fumadocs-notion
- Owner: fuma-nama
- License: mit
- Created: 2024-12-03T11:48:13.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T11:22:47.000Z (2 months ago)
- Last Synced: 2024-12-31T09:31:52.558Z (about 1 month ago)
- Topics: docs, fumadocs, nextjs, notion
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## fumadocs-notion
This is an example Fumadocs app that works with Notion.
### Setup
Create a Notion integration on https://www.notion.so/profile/integrations, select the correct workspace, and add your
secret to `.env.local` after creation.```
NOTION_API_KEY=secret
```You can now connect certain pages to the integration, from the page menu:
![Preview](/notion-settings.png)
Find your integration name here and connect it to your page.
After adding pages, run development server:
```bash
pnpm dev
```Open http://localhost:3000 with your browser to see the result.
### How it works?
This app uses the Notion API to fetch pages and implement search functionality, and with `react-notion-x` to render page
content in React.Feel free to take a look in the example for details.
### Supported Features
The example is relatively simple, it only supports simple block types, and do not support the full functionality of
database.Dynamic rendering can also be enabled by setting `revalidate` segment config in `/app/docs/[id]/page.tsx`, like:
```tsx
export const revalidate = 4000
```