Giter Site home page Giter Site logo

nobu36 / astro-notion-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from otoyo/astro-notion-blog

0.0 0.0 0.0 605 KB

๐Ÿš€ Let's start your own Notion Blog with Astro.

Home Page: https://astro-notion-blog.pages.dev/

License: MIT License

JavaScript 32.47% TypeScript 26.23% CSS 2.68% Astro 38.62%

astro-notion-blog's Introduction

English | ๆ—ฅๆœฌ่ชž

astro-notion-blog

GitHub stars GitHub license

astro-notion-blog helps to create a blog you can write with Notion.
The blog is generated statically by Astro so very fast.

  • ๐Ÿš€ Very fast page view
  • ๐Ÿ“ Can write a blog with Notion
  • ๐Ÿ› ๏ธ Can fully customize the site's appearance
  • โœ… Using official Notion APIs

Screenshots

Demo

https://astro-notion-blog.pages.dev/blog

Quick Start

Requirements

Steps

  1. Star this repo ๐Ÿ˜‰
    • It makes me motivative!
  2. Duplicate the blog template into your Notion.
  3. Note the part of the page (database) URL https://notion.so/your-account/<HERE>?v=xxxx as DATABASE_ID

  1. Create an integration and note "Internal Integration Token" as NOTION_API_SECRET
  2. Share a database with your integration at the Notion database page
  3. Fork this repository into your account
    • The Fork button is at the top of the page and the left of the Star
  4. Go to Cloudflare Pages and sign in
  5. Create new project with "Connect to Git" with your forked repository <your-account>/astro-notion-blog, then click "Begin setup"
  6. In "Build settings" section,
    1. Select "Astro" as "Framework preset"
    2. Open "Environment Variables (advanced)" and set NODE_VERSION, NOTION_API_SECRET and DATABASE_ID

  1. Click the "Save and Deploy" button, then your Notion Blog will be published after deploy

Note that astro-notion-blog requires a deploy every time if you publish a new post or updates.
Deploy manually from the Cloudflare Pages dashboard or use a scheduled deploy using CI like GitHub Actions.

How to customize

Additional requirements

  • Node.js v16 or higher
  • Yarn

Steps

  1. Create .env file under the project root and put your environment variables as follows:
NOTION_API_SECRET=<YOUR_NOTION_API_SECRET>
DATABASE_ID=<YOUR_DATABASE_ID>
  1. Install dependencies and start local server.
yarn install
yarn dev
  1. Open http://localhost:3000 in your browser.
  2. Press Ctrl+C in the terminal to stop.

For more information

See wiki.

Bug reports & feature requests

Please create an issue. Both in English and in Japanese are OK. ๐Ÿ˜‰

๐Ÿฆ Twitter community

You can support other members and/or can be supported by other members.

Contribution

Pull requests are welcome.


astro-notion-blog is based otoyo/notion-blog

astro-notion-blog's People

Contributors

norikt avatar otoyo avatar trickstar13 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.