VercelLogotypeVercelLogotype
LoginSign Up

Notion-Powered Next.js Blog

Launch your SEO-friendly, responsive blog, powered by Notion.

DeployView Demo
This is an auto-uploaded thumbnail from https://vercel.com/templates/submit.

Notion-Powered Next.js Blog Template

A modern, fast, and customizable blog template powered by Notion as a CMS and Next.js. This template allows you to use Notion as your content management system while serving your blog with Next.js.

Features

  • 🚀 Built with Next.js 14+ and App Router
  • 📝 Use Notion as a CMS
  • 🎨 Beautiful and responsive design
  • ⚡ Fast page loads with static generation
  • 🔍 SEO optimized
  • 📱 Mobile-friendly
  • 🌙 Dark mode support
  • ✨ Syntax highlighting for code blocks
  • 📊 Table support
  • 🖼️ Image optimization
  • 📅 Reading time and word count

Prerequisites

  • Node.js 18.17.1 or later
  • A Notion account
  • Basic knowledge of Next.js and React

Getting Started

1. Clone the Template

  1. Visit this Notion template: Blog Template
  2. Click "Duplicate" to clone it to your workspace
  3. Clone this repository to your local machine

2. Set Up Notion Integration

  1. Go to Notion Developers
  2. Click "New integration"
  3. Fill in the integration details:
    • Name: Choose a name for your integration
    • Select the workspace where you cloned the blog template
    • Choose "Internal integration"
  4. Under "Capabilities", select only "Read content" (uncheck Insert content and Update content)
  5. Copy the "Internal Integration Token" (this will be your NOTION_TOKEN)

3. Connect Integration to Your Database

  1. Go to your cloned Notion blog page
  2. Click the "•••" (three dots) in the top right corner
  3. Go to "Connections" -> find your integration and click "Connect"

4. Get Your Database ID

  1. Open your Notion database in the browser
  2. Copy the ID from the URL. For example:
    https://www.notion.so/20bf471a8ac78080a3d4dad6ed77ca17?v=...
    └───────── Database ID ─────────┘

5. Environment Setup

  1. Create a .env.local file in your project root:
    NOTION_TOKEN=your_integration_token_here
    NOTION_DATABASE_ID=your_database_id_here
    NEXT_PUBLIC_SITE_URL=your_site_url_here

6. Install and Run

npm install
npm run dev

Visit http://localhost:3000 to see your blog.

Customizing the Template

Adding New Properties

  1. In your Notion database, you can add new properties by clicking "+ Add a property"
  2. To use new properties in your blog, modify src/lib/notion.ts:
export interface Post {
// ... existing properties ...
yourNewProperty?: string; // Add your new property
}
export async function getPost(pageId: string): Promise<Post | null> {
try {
// ... existing code ...
const post: Post = {
// ... existing properties ...
yourNewProperty: properties.YourNewProperty?.your_property_type?.value,
};
// ... rest of the code ...
}
}

Customizing the Layout

  • Modify src/app/posts/[slug]/page.tsx to change the blog post layout
  • Update src/components/mdx-component.tsx to customize markdown rendering
  • Style components using Tailwind CSS classes

Managing Your Blog

  1. Access your integration settings anytime:

    • Go to Notion Settings -> Connections
    • Find your integration
    • Click "•••" -> "Manage in developer portal"
  2. Create new blog posts:

    • Add a new page to your Notion database
    • Fill in the required properties
    • Set status to "Published" when ready

Database Properties

The template uses these default properties:

  • Title - The post title (required)
  • Status - Publication status (Published/Draft)
  • Published Date - Post publication date
  • Author - Post author
  • Tags - Post tags (multi-select)
  • Category - Post category (select)
  • Featured Image - Cover image URL

Contributing

Feel free to submit issues and enhancement requests!

License

MIT License - feel free to use this template for your own blog!

GitHub Repothegesturs/notion-blogs
Use Cases
Blog
Stack
Next.js
Tailwind
CMS
Notion

Related Templates

Next.js Waitlist with Notion CMS

A simple Next.js waitlist template with Notion as a CMS, Upstash Redis for rate limiting, and Resend for sending emails via custom domain.
Next.js Waitlist with Notion CMS thumbnail

Notion-backed Next.js Blog

A Next.js site using new SSG support with a Notion backed blog
Notion-backed Next.js Blog thumbnail

Get Started

  • Templates
  • Supported frameworks
  • Marketplace
  • Domains

Build

  • Next.js on Vercel
  • Turborepo
  • v0

Scale

  • Content delivery network
  • Fluid compute
  • CI/CD
  • Observability
  • AI GatewayNew
  • Vercel AgentNew

Secure

  • Platform security
  • Web Application Firewall
  • Bot management
  • BotID
  • SandboxNew

Resources

  • Pricing
  • Customers
  • Enterprise
  • Articles
  • Startups
  • Solution partners

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Community

Frameworks

  • Next.js
  • Nuxt
  • Svelte
  • Nitro
  • Turbo

SDKs

  • AI SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDK
  • Streamdown AINew

Use Cases

  • Composable commerce
  • Multi-tenant platforms
  • Web apps
  • Marketing sites
  • Platform engineers
  • Design engineers

Company

  • About
  • Careers
  • Help
  • Press
  • Legal
  • Privacy Policy

Community

  • Open source program
  • Events
  • Shipped on Vercel
  • GitHub
  • LinkedIn
  • X
  • YouTube

Loading status…

Select a display theme:
    • AI Cloud
      • AI Gateway

        One endpoint, all your models

      • Sandbox

        Isolated, safe code execution

      • Vercel Agent

        An agent that knows your stack

      • AI SDK

        The AI Toolkit for TypeScript

      • v0

        Build applications with AI

    • Core Platform
      • CI/CD

        Helping teams ship 6× faster

      • Content Delivery

        Fast, scalable, and reliable

      • Fluid Compute

        Servers, in serverless form

      • Workflow

        Long-running workflows at scale

      • Observability

        Trace every step

    • Security
      • Bot Management

        Scalable bot protection

      • BotID

        Invisible CAPTCHA

      • Platform Security

        DDoS Protection, Firewall

      • Web Application Firewall

        Granular, custom protection

    • Company
      • Customers

        Trusted by the best teams

      • Blog

        The latest posts and changes

      • Changelog

        See what shipped

      • Press

        Read the latest news

      • Events

        Join us at an event

    • Learn
      • Docs

        Vercel documentation

      • Academy

        Linear courses to level up

      • Knowledge Base

        Find help quickly

      • Community

        Join the conversation

    • Open Source
      • Next.js

        The native Next.js platform

      • Nuxt

        The progressive web framework

      • Svelte

        The web’s efficient UI framework

      • Turborepo

        Speed with Enterprise scale

    • Use Cases
      • AI Apps

        Deploy at the speed of AI

      • Composable Commerce

        Power storefronts that convert

      • Marketing Sites

        Launch campaigns fast

      • Multi-tenant Platforms

        Scale apps with one codebase

      • Web Apps

        Ship features, not infrastructure

    • Tools
      • Marketplace

        Extend and automate workflows

      • Templates

        Jumpstart app development

      • Partner Finder

        Get help from solution partners

    • Users
      • Platform Engineers

        Automate away repetition

      • Design Engineers

        Deploy for every idea

  • Enterprise
  • Pricing
Log InContact
Sign Up
Sign Up
This template is unavailable
AI Gateway

One endpoint, all your models

Sandbox

Isolated, safe code execution

Vercel Agent

An agent that knows your stack

AI SDK

The AI Toolkit for TypeScript

v0

Build applications with AI

CI/CD

Helping teams ship 6× faster

Content Delivery

Fast, scalable, and reliable

Fluid Compute

Servers, in serverless form

Workflow

Long-running workflows at scale

Observability

Trace every step

Bot Management

Scalable bot protection

BotID

Invisible CAPTCHA

Platform Security

DDoS Protection, Firewall

Web Application Firewall

Granular, custom protection

Customers

Trusted by the best teams

Blog

The latest posts and changes

Changelog

See what shipped

Press

Read the latest news

Events

Join us at an event

Docs

Vercel documentation

Academy

Linear courses to level up

Knowledge Base

Find help quickly

Community

Join the conversation

Next.js

The native Next.js platform

Nuxt

The progressive web framework

Svelte

The web’s efficient UI framework

Turborepo

Speed with Enterprise scale

AI Apps

Deploy at the speed of AI

Composable Commerce

Power storefronts that convert

Marketing Sites

Launch campaigns fast

Multi-tenant Platforms

Scale apps with one codebase

Web Apps

Ship features, not infrastructure

Marketplace

Extend and automate workflows

Templates

Jumpstart app development

Partner Finder

Get help from solution partners

Platform Engineers

Automate away repetition

Design Engineers

Deploy for every idea