This is a Next.js project bootstrapped with create-next-app.
- Deal with the server console to browser console issue
- Notion API ans types
- Usability of the
react-notion-x. There no one mantaining the project and it's not working properly. - i18n with Minimal i18n routing and translations
- Create a new integration in Notion from here
- After creating the integration, you will get the
Integration Secretwhich you will use to authenticate your requests. - Click
showto get the secret and copy it, which is something likesecret_.... - Create a new database in Notion and add some posts in it.
- Press the
...button on the top right corner of the database and click onConnect toand click the integration name you created. - Copy the
Database IDfrom the URL of the database, which is something likehttps://www.notion.so/...?v=123123123and the...is theDatabase ID. - Create a new
.env.localfile in the root of the project and add the following environment variables:NOTION_API_SECRET=secret_... NOTION_DATABASE_ID=...
- Install the
@notionhq/clientofficial package by running:pnpm add @notionhq/client
- Notion Page template
- type guards is working for all types of notion objects
- If the block is a database, the block id is the database id
.env.localNOTION_DATABASE_ID is the entry point of notion database. This is a page with two inline databases with two locales.- When upload files, the url will expire in one hour. You can see the link for further information.
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
next dev --turbois not working properly. It's not updating the page when its not-found.
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.