English | 日本語
astro-notion-blog enables you to create a blog using Notion and generates it statically, resulting in lightning-fast page views.
- 🚀 Blazing fast page views
- 📝 With the ability to write blog content in Notion
- 🛠️ Customize your site's appearance to your liking
- ✅ Take advantage of the official Notion APIs
![](https://private-user-images.githubusercontent.com/1063435/253799461-967bbc23-014c-427d-b6cd-02c41822fb45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzcwMjEsIm5iZiI6MTczODkzNjcyMSwicGF0aCI6Ii8xMDYzNDM1LzI1Mzc5OTQ2MS05NjdiYmMyMy0wMTRjLTQyN2QtYjZjZC0wMmM0MTgyMmZiNDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTM1ODQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWE2MGE2YzNjOGY4OThhNDA4NmZlYTJjZmZkZGYwMDAyZjQ1ZDFkMTIxZDIzY2RmOTA5NzA1YTBhMWUzODkwNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.u4jhJXjokEX-3yEWNieeTHjobBFs1TRw-ykrQ-dWLXM)
![](https://private-user-images.githubusercontent.com/1063435/253799542-bf1add06-1f1c-42ca-88c9-decb8c0dcf8f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzcwMjEsIm5iZiI6MTczODkzNjcyMSwicGF0aCI6Ii8xMDYzNDM1LzI1Mzc5OTU0Mi1iZjFhZGQwNi0xZjFjLTQyY2EtODhjOS1kZWNiOGMwZGNmOGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTM1ODQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDg0NmRiZGMyNjJkMTVkYjFhZGRlYjE2ZDI2NzVkNDdiMzVhOTVmOTQ4MzhmMTI2NjgyY2U1MTBiMTQzYTg0OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.qsnjU1DbkkZREYQ21vqKkLUlUIBB81E7j6iVAbRb7gM)
https://astro-notion-blog.pages.dev
- If you enjoy using this repo, don't forget to give it a star! 😉
- This is very motivating!
- Simply duplicate the blog template into your Notion workspace.
- Once you've duplicated the page (database), customize it to your liking by changing the icon, title, and description.
- For future reference, identify the
DATABASE_ID
by noting the portion of the duplicated page (database) URL that appears as https://notion.so/your-account/?v=xxxx.
- Create an integration and note "Internal Integration Token" as
NOTION_API_SECRET
- To integrate your application with Notion, share a database with your integration.
- To make a copy of this repository in your own account, fork it by clicking on the 'Fork' button in the top-right corner of the repository page.
- 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" section,
- Select "Astro" as "Framework preset"
- Open "Environment Variables (advanced)" and set
NODE_VERSION
,NOTION_API_SECRET
andDATABASE_ID
NODE_VERSION
is20.18.1
or higher- How to deploy a site with Git is helpful
![](https://private-user-images.githubusercontent.com/1063435/400955848-34fa8e2e-db34-40d3-87a6-acdb0d4e66db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzcwMjEsIm5iZiI6MTczODkzNjcyMSwicGF0aCI6Ii8xMDYzNDM1LzQwMDk1NTg0OC0zNGZhOGUyZS1kYjM0LTQwZDMtODdhNi1hY2RiMGQ0ZTY2ZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTM1ODQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODkwZjE0ZDFhN2I3M2EyM2YwNmM1OGM0MzI1ZDYxMzQ2YTgxMzU1NmJmYTNhOWE2N2JhZmJhODRjMDM0MGY0NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.uzg0wEQJx-d1AtGDX6fNI_SRHvy35vRODIqvLGoB_tA)
- After clicking the 'Save and Deploy' button, your Notion Blog will be published once the deployment process is complete.
Please note that the astro-notion-blog requires manual deployment every time you publish a new post or make updates. You can deploy manually from the Cloudflare Pages dashboard or set up a scheduled deploy using CI tools such as GitHub Actions.
- Node.js v20.18.1 or higher
- To set your secrets as environment variables, run the following commands in your terminal:
export NOTION_API_SECRET=<YOUR_NOTION_API_SECRET>
export DATABASE_ID=<YOUR_DATABASE_ID>
- Install dependencies and start local server
npm install
npm run dev
- Open http://localhost:4321 in your browser
- Press
Ctrl+C
in the terminal to stop
See wiki.
To report an issue, please create a new Issue. You can use either English or Japanese to describe the issue. 😉
If you like astro-notion-blog, sponsor me so that I can keep on developing software. Thank you.
astro-notion-blog is based otoyo/notion-blog