Skip to content

romancemorio/astro-notion-blog

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

Quick Start

Requirements

Steps

  1. Star this repo πŸ˜‰
    • It makes me motivative!
  2. Duplicate the blog template into your Notion.
  3. Change the icon, the title, the description in the duplicated page(database)

  1. Note the part of the duplicated 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,
  7. Select "Astro" as "Framework preset"
  8. 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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Astro 39.9%
  • JavaScript 31.1%
  • TypeScript 27.2%
  • CSS 1.8%