English | ζ₯ζ¬θͺ
astro-notion-blog helps to create a blog you can writte 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
- Star this repo π
- It makes me motivative!
- Duplicate the blog template into your Notion.
- Note the part of URL
https://notion.so/your-account/<HERE>?v=xxxx
asDATABASE_ID
- ex)
158bd90116004cd19aca26ad88cb5c07
β οΈ CAUTION:?v=NOT_THIS_VALUE
. Use ahead strings.
- URL is retrieved from "Copy link"
- ex)
- Create an integration and note "Internal Integration Token" as
NOTION_API_SECRET
- Share a database with your integration at the Notion database page
- Fork this repository into your account
- The Fork button is at the top of the page and the left of the Star
- Go to Cloudflare Pages and sign in
- Create new project with "Connect to Git" with your forked repository
<your-account>/astro-notion-blog
, then click "Begin setup" - In build settings, open "Environment Variables" and set
NODE_VERSION
,NOTION_API_SECRET
andDATABASE_ID
NODE_VERSION
isv16.13.0
or higher- How to deploy a site with Git is helpful
Please add NOTION_API_SECRET
and DATABASE_ID
as a encrypted value, and add NODE_VERSION
with v16.13.0
or higher to Production and Preview.
- 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.
https://astro-notion-blog.pages.dev/blog
- Node.js v16 or higher
- Yarn
- 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>
- Install dependencies and start local server.
yarn install
yarn dev
- Open http://localhost:3000 in your browser.
- Press
Ctrl+C
in the terminal to stop.
See wiki.
Please create an issue. Both in English and in Japanese are OK. π
Pull requests are welcome.
astro-notion-blog is based otoyo/notion-blog