Next.js example blog powered by Notion Public API
This product is a Next.js blog that utilizes Notion’s Public API. It allows users to create and manage blog posts using Notion as the content management system. The demo for this blog can be found at https://notion-blog-nextjs-coral.vercel.app. The documentation on how to use and set up this blog can be found at https://samuelkraft.com/blog/building-a-notion-blog-with-public-api.
To install and set up this blog, follow these steps:
NOTION_TOKEN
and a NOTION_DATABASE_ID
..env.local
in the root directory of the project..env.local
file, add the following environment variables:NEXT_PUBLIC_NOTION_TOKEN=YOUR_NOTION_TOKEN
NEXT_PUBLIC_NOTION_DATABASE_ID=YOUR_NOTION_DATABASE_ID
YOUR_NOTION_TOKEN
with the NOTION_TOKEN
you obtained from Notion, and YOUR_NOTION_DATABASE_ID
with the NOTION_DATABASE_ID
you obtained from Notion.npm install
npm run dev
This Next.js blog uses Notion’s Public API as the content management system, allowing users to create and manage blog posts in Notion. It relies on Next.js for server-side rendering and static site generation, making it fast and efficient. The use of the Notion Public API enables dynamic content fetching, ensuring that the blog is always up-to-date. The setup and installation process is straightforward, and the blog can be easily deployed using Vercel.