This repository contains a mini kit for integrating Notion API with Next.js. This kit provides a simple and efficient way to connect your Next.js applications with Notion to access and display data.
- Seamless integration of Notion API with Next.js
- Easy setup and configuration
- Flexible customization options
- Lightweight and performant
- Revalidate path for static generation
- Next.js: version 14x
- Notion API
- React Notion: minimal renderer for blogs & content pages
- @notionhq/client: A simple and easy to use client for the Notion API
- Headlessui: UI components, designed to integrate beautifully with Tailwind CSS
- English: Guide to building a personal blog with Next.js and Notion
- Vietnamese: Hướng dẫn xây dựng blog cá nhân với NextJs và Notion
To get started with the Notion Next.js Mini Kit, follow these steps:
Clone the repository:
git clone https://github.com/khaaleoo/notion-nextjs-mini-kit.git
Install dependencies:
cd notion-nextjs-mini-kit
pnpm install
Copy the content in .env.sample to your .env or .env.local
Run the project
pnpm dev
To run this project, you will need to add the following environment variables to your .env file
NOTION_TOKEN
NOTION_DATABASE_ID
To revalidate static pages, access the following endpoint:
https://yourdomain/api/revalidate?path=/yourpath&secret=yoursecret
This project is used by the following pages/blogs:
Contributions are always welcome!
If you have any feedback, please reach out to me at khalx.leo@gmail.com