GithubHelp home page GithubHelp logo

weiyiao / 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 696 KB

๐Ÿš€ Begin building your very own Notion Blog with Astro.

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

License: MIT License

JavaScript 30.80% TypeScript 27.27% CSS 1.77% Astro 40.17%

astro-notion-blog's Introduction

English | ๆ—ฅๆœฌ่ชž

astro-notion-blog

GitHub stars GitHub license

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

Screenshots

Demo

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

Quick Start

Requirements

Steps

  1. If you enjoy using this repo, don't forget to give it a star! ๐Ÿ˜‰
    • This is very motivating!
  2. Simply duplicate the blog template into your Notion workspace.
  3. Once you've duplicated the page (database), customize it to your liking by changing the icon, title, and description.

  1. 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.

  1. Create an integration and note "Internal Integration Token" as NOTION_API_SECRET
  2. To integrate your application with Notion, share a database with your integration.
  3. 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.
  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. 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.

How to customize

Additional requirements

  • Node.js v16 or higher
  • Yarn

Steps

  1. 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>
  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

To report an issue, please create a new Issue. You can use either English or Japanese to describe the issue. ๐Ÿ˜‰

๐Ÿฆ Twitter community

In our community, you have the opportunity to both support and be supported by other members.

Contribution

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

astro-notion-blog's People

Contributors

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