Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.2 KB

File metadata and controls

42 lines (30 loc) · 1.2 KB

This is a Next.js blog written in Typescript that uses Notion's Public API.

Demo: https://www.zamiang.com

Based on: https://samuelkraft.com/blog/building-a-notion-blog-with-public-api

Features

  • Sitemap
  • RSS feed
  • Google Analytics
  • Content Security Policy (CSP)
  • Robust eslint and prettier config
  • Supports all Notion blocks current supported by the API
  • Pages for photos and writing
  • imgix cdn for images (to reduce Vercel hosting cost and improve speed)

Getting Started

First, follow the Notion API getting started guide to get a NOTION_TOKEN, NOTION_POSTS_DATABASE_ID and NOTION_PHOTOS_DATABASE_ID. Optionally, include GOOGLE_ANALYTICS_ID. Add them all to a file called .env.local.

NOTION_TOKEN=
NOTION_POSTS_DATABASE_ID=
NOTION_PHOTOS_DATABASE_ID=
GOOGLE_ANALYTICS_ID=
IMGIX_TOKEN=

Install dependencies

npm install

Start the server with

npm run dev

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