Giter VIP home page Giter VIP logo

easy-notion-blog's Introduction

English | 日本語

easy-notion-blog

GitHub stars GitHub license

Easy to start your blog.

You can write on your Notion.

Screenshot

Screenshot

Demo

https://easy-notion-blog-otoyo.vercel.app/blog

Users' blogs

Features

  • Very fast!
  • Write on the Notion
  • Using official API
  • Full customization

Requirements

(For your customization)

Quick Start

  1. Go to notion.so and log-in with your Notion account.
  2. Create a blank page.
  3. Type /table and select "Table - Inline" (Fig.1)
  4. Go to under page(database) named as "Untitled" (Fig.2)
  5. Note the part of URL https://notion.so/your-account/<HERE>?v=xxxx as DATABASE_ID
  6. Create an integration and note "Internal Integration Token" as NOTION_API_SECRET
  7. Share a database with your integration in the previous database
  8. Open the Terminal.app and clone this repo into your local git clone [email protected]:otoyo/easy-notion-blog.git && cd easy-notion-blog
  9. Run initialization script DATABASE_ID='<YOUR_DATABASE_ID>' NOTION_API_SECRET='<YOUR_NOTION_API_SECRET>' ./scripts/init-database.sh
  10. Go to vercel.com and log-in with your account
  11. Create new project by importing GitHub repo otoyo/easy-notion-blog (Skip team create)
  12. In "Configure Project", open "Environment Variables" settings and set NOTION_API_SECRET and DATABASE_ID
  13. Your Notion Blog will be published after deploy

Fig.1 Select "Table - Inline" after typing /table

Fig.1


Fig.2 Move "Untitled" database under the new page

Fig.2

Database properties

Property Description Example
Page A blog entry.
Slug Entry ID used as end of URL. Valid URL characters are only allowed. my-1st-entry
Date Publishing date 2021/12/1
Tags Categorize entories by tags Diary
OGImage An image treated as og-image
Excerpt Excerpt of the entry This is my 1st entry.
Published Publishing state. Only checked entries are published.
Rank Recommendation rank. Recommended entries are ordered by rank decendant 10

How to customize

Fork this repo from "Fork" button and clone it into your local.

Create .env.local file in project root and write your ENV as follows.

NOTION_API_SECRET=<YOUR_NOTION_API_SECRET>
DATABASE_ID=<YOUR_DATABASE_ID>

Install dependencies and start local server.

# Install dependencies
yarn install

# Start local server at localhost:3000
yarn dev

Open http://localhost:3000 in your browser.

Entries without Published are also displayed for preview in local. But no Slug entries are not displayed.

Press Ctrl+C to stop local server in the terminal.

Optional settings

  • favicon
    • Place favicon.ico under public/ directory
  • Google Analytics 4
    • Set your tracking ID to "Environment Variables" as NEXT_PUBLIC_GA_TRACKING_ID
  • Social Buttons
    • Set your site URL to "Environment Variables" as NEXT_PUBLIC_URL

Bug report & requests

Please create an issue in English or Japanese.

Contribution

Pull requests are welcome.


easy-notion-blog is based on ijjk/notion-blog and otoyo/notion-blog

easy-notion-blog's People

Contributors

otoyo avatar

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.