English | ζ₯ζ¬θͺ
astro-notion-blog enables you to create a blog using Notion and generates it statically, resulting in lightning-fast page views.
- π Lightning-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://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
isv18.16.0
or higher- How to deploy a site with Git is helpful
![](https://private-user-images.githubusercontent.com/1063435/239668196-bc1ceef1-d67a-490b-b465-34af1b0f8010.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyOTcwMzMsIm5iZiI6MTcyNDI5NjczMywicGF0aCI6Ii8xMDYzNDM1LzIzOTY2ODE5Ni1iYzFjZWVmMS1kNjdhLTQ5MGItYjQ2NS0zNGFmMWIwZjgwMTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjJUMDMxODUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzhjMjljYjcwNDIxMDg5YjI3MjZjOTQ3NGMxMjdhMmI0ZmE4ZjU4OTEyZjAwN2ZjNmQxZWYyMGYwMGFkZDY3MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.88y5gLTEFz2lgGP5Jy4wqmmbPPSe_BcRQsZKpAjoA34)
- 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 v18 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:3000 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. π
In our community, you have the opportunity to both support and be supported by other members.
We welcome pull requests from anyone who wants to contribute to our project. Your contributions are greatly appreciated!
astro-notion-blog is based otoyo/notion-blog