Giter VIP home page Giter VIP logo

notion-headless-cms-nextjs-blog's Introduction

notion-headless-cms-nextjs-blog

This repository is for displaying articles written in Notion in a blog application implemented in Next.js.

2e062e0eb21e02acdf2e4c15583f4ff4

Motivation for this Repository

I wanted to create my own blog and use Notion as an editor for writing articles, which is what I am used to doing.

Ref

Architecture

sequenceDiagram
  participant Notion
  participant Next.js
  Next.js->>Notion: fetch data via Notion API
  Notion->>Next.js: return pages, blocks object

Tech Stack

  • React v18.2.0
  • Next.js v13.1.2
  • TypeScript v4.9.4
  • @notionhq/client(Notion API Client) v1.0.4
    • The latest version is v2, but due to destructive changes in the API interface, v1 is used.

Getting Started

setup Notion API

see https://developers.notion.com/docs/create-a-notion-integration

After creating the Notion API secret key and database, change .env.local as follows

NOTION_KEY=secret_xxx
NOTION_DATABASE_ID=xxx

run local

First, run the development server:

npm install
npm run dev

Second, run build:

npm run build

Finally, run start

npm run start

Deploy

This app is using Vercel. So, git push only.

URL: https://samuraikun-notion-blog.vercel.app/

notion-headless-cms-nextjs-blog's People

Contributors

dependabot[bot] avatar samuraikun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

notion-headless-cms-nextjs-blog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.