nextjs-notion-blog-starter

Notion-powered blog starter with @vercel and @tailwindcss

MIT License

Stars
194

Nextjs Notion Blog Starter

  • Default demo - Deployed from main branch
  • Blog setup - I wrote an article on how to use this starter to start your blog

โœจ Features

  • โœ… Setup takes only a few minutes (single file config) ๐Ÿ’ช

  • โœ… Newsletter subscription via Convertkit API

  • โœ… Simple analytics with Umami

  • โœ… Automatic OG social images with Tailwind template

  • โœ… Automatic pretty URLs

  • โœ… Excellent page speed

  • โœ… Optimized for Next.js and Vercel

๐Ÿ›  Build with

๐Ÿ“• Project Overview

  • layouts/* - The different layouts used on each page.
  • components/* - Components used throughout the site.
  • components/blocks/* - Custom blocks made for Notion rendering.
  • utils/* - Short for "utilities", a collection of helpful utilities or code for external services.
  • pages/api/* - API routes powering /og-image dynamic OG image and /subscribe-convertkit newsletter subscription.
  • pages/blog/* - Static pre-rendered blog pages that fetch information from the Notion API.
  • pages/* - All other static pages.
  • public/* - Static assets including images, fonts, and videos.
  • styles/* - global styles and Tailwind.
  • siteData.ts - a simple file containing global data about the site.

๐Ÿƒโ€โ™‚๏ธ Running Locally

git clone https://github.com/tuanphungcz/nextjs-notion-blog-starter
cd nextjs-notion-blog-starter
pnpm install
pnpm run dev

Create a .env file similar to .env.example and include the appropriate keys.

๐Ÿš€ Deploy to vercel

NOTION_SECRET=
BLOG_DATABASE_ID=

# ConvertKit is optional
NEXT_PUBLIC_CONVERTKIT_FORM_ID=
NEXT_PUBLIC_CONVERTKIT_API_KEY=

# Umami is optional
NEXT_PUBLIC_UMAMI_ID=
NEXT_PUBLIC_UMAMI_URL=

๐Ÿ’โ€โ™€๏ธ How to use

  • Blog setup - I wrote an article on how to use this starter to start your blog

๐Ÿ“ Credit & inspiration

This blog starter was inspired by all of these awesome open-sources

Badges
Extracted from project README's
Deploy with Vercel
Related Projects