Skip to content

karadalex/nextjs-notion-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NextJS Blog using the Notion API

The simplest Blog with Notion as a CMS and NextJS with only 3 dependencies!

Getting Started

  • Setup Notion (see blog post tutorial)
  • Copy .env.example file to .env.local and add your Notion API secret token and database ID

and then run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Features

  • List of blog posts from Notion Database
  • Page content from Notion
  • Blog post metadata (date, author, tags)
  • Incremental Static Regeneration
  • NextJS API endpoints (useful if you want to consume the same data from other apps), both dynamic and static fetching of content
  • Pagination
  • Search
  • Filter by tags
  • Advanced content parsing (Notion Blocks)

Learn More

Learn more at this blog post tutorial

Deployment

Deploy the example using Vercel:

Deploy with Vercel

About

A simple blog using NextJS and Notion as a CMS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published