It should be possible to run a blog off of Notion. Heavily work in progress, build with Next.js and the Notion API.
- Node.js 18+
- A Notion account
git clone https://github.com/your-username/next-notion-blog.git
cd next-notion-blog
npm install- Go to notion.so/my-integrations and click New integration
- Give it a name, select your workspace, and submit
- Copy the Internal Integration Token — this is your
NOTION_AUTHvalue
Create a Notion database (full page, not inline) with these properties:
| Property name | Type | Purpose |
|---|---|---|
Name |
Title | Post title (built-in, already exists) |
url |
Text | URL slug used for routing (e.g. my-post) |
published_time |
Date | Publication date, used for sorting |
Only pages with a non-empty url property are shown in the listing.
Share the database with your integration: open the database, click the ... menu → Add connections → select your integration.
Get the database ID from the URL when the database is open as a full page:
https://notion.so/yourworkspace/<DATABASE_ID>?v=...
The database ID is the 32-character string before the ?.
cp .env.local.example .env.localEdit .env.local and fill in your values:
NOTION_AUTH=secret_xxxx # integration token from step 2
DB_ID=xxxx # database ID from step 3
npm run devOpen http://localhost:3000.
- Lists of pages, sorted by date, displayed based on a tag
- Simple paragraphs with all styles
- All headlines (with styles)
- Lists (rendered as valid HTML, as notion only send single items)
- Inline code blocks
- Quotes
- Images with captions

