Notion-Powered Website
A modern Next.js website powered by Notion as your database. No more Super.so fees!
Features
- β Fetch data from Notion databases
- β Server-side rendering with Next.js
- β Tailwind CSS + shadecn/ui components
- β Free hosting on Netlify + GitHub
- β Automatic builds on Notion updates
Setup
1. Create Notion Integration
- Go to Notion Integrations
- Click βCreate new integrationβ
- Name it βPatttternsβ
- Copy the Internal Integration Token
- Go to your database β Share β Select your integration
- Copy the Database ID from the URL
2. Environment Variables
Create .env.local:
NOTION_API_KEY=your_token_here
NOTION_HOMEPAGE_ID=your_database_id_here
3. Run Locally
npm install
npm run dev
Visit http://localhost:3000
Deployment to Netlify
- Push to GitHub
- Connect repo to Netlify
- Add environment variables in Netlify settings
- Deploy!
Project Structure
src/
βββ app/ # Next.js App Router pages
β βββ page.tsx # Home page
β βββ layout.tsx # Root layout
βββ lib/
β βββ notion.ts # Notion API client
βββ components/
βββ NotionPageGrid.tsx # Display Notion data
API Reference
getNotionDatabase(databaseId)
Fetches all pages from a Notion database.
import { getNotionDatabase } from "@/lib/notion";
const pages = await getNotionDatabase("your-database-id");
Customization
Edit src/components/NotionPageGrid.tsx to customize the UI:
- Change grid layout
- Add more property displays
- Style with Tailwind
Next Steps
- Add filtering/search
- Create single page view
- Add image galleries
- Deploy to Netlify
License
MIT