Skip to main content

Next.js Integration

Learn how to integrate NotCMS with Next.js App Router to build a fully-featured blog.

Setup

1. Create Next.js Project

2. Install NotCMS

3. Initialize NotCMS

4. Configure Next.js

Update next.config.js:

Project Structure

Blog Listing Page

app/page.tsx

Blog Post Page

app/[id]/page.tsx

Components

components/BlogCard.tsx

components/BlogPost.tsx

Rich Text Rendering

components/RichText.tsx

Convert the content to HTML using a markdown parser as you like.

Performance Optimization

Static Generation

Image Optimization

Don’t forget to add the domain to the next.config.js file.

SEO Optimization

Metadata API

Deployment

Environment Variables

Set these in your deployment platform:

Next Steps

Blog Template

Use our ready-made blog template

Explore usage

Explore usage of NotCMS