1.1.28 • Published 5 months ago

gatsby-source-notion-churnotion v1.1.28

Weekly downloads
-
License
0BSD
Repository
github
Last release
5 months ago

gatsby-source-notion-churnotion

Gatsby plugin to connect with a Notion database recursively using the official API.

This plugin recursively collects categories from a single Notion database, which can be used as a CMS for your blog. It ultimately creates a Churnotion node that converts the components of a Notion page into MDX components and stores them in JSON format.

If you're considering Notion as your CMS for Gatsby, this plugin could be a great choice as it supports recursive category collection.

Install

npm install gatsby-source-notion-churnotion
yarn add gatsby-source-notion-churnotion

How to use

You need to set the following environment variables:

GATSBY_INTEGRATION_TOKEN GATSBY_DATABASE_ID To get the integration token, set it up in your Notion database, and find the database ID, refer to the official Notion Integration Guide.

환경변수 설정

GATSBY_INTEGRATION_TOKEN={Your Notion API Integration Token}
GATSBY_DATABASE_ID={Your Notion Database ID}

gatsby-config.ts / gatsby-config.js 추가

const config: GatsbyConfig = {
  plugins: [
    {
      resolve: `gatsby-source-notion-churnotion`,
      options: {
        token: process.env.GATSBY_INTEGRATION_TOKEN,
        databaseId: process.env.GATSBY_DATABASE_ID,
      },
    },
  ],
};

Run Development Server

npm run develop
yarn develop
gatsby develop

When the development server is running, gatsby-source-notion-churnotion will fetch categories and pages from your Notion database using the official Notion API.

alt text

Explore in GraphQL

Once the data is fetched, go to http://localhost:8000/__graphql, where you’ll find new nodes such as Churnotion, NBook, NCategory, and NTag as shown below:

alt text

Example Query

Use the following GraphQL query to explore the Churnotion node:

query MyQuery {
  allChurnotion {
    nodes {
      id
      content
    }
  }
}

This will return results in MDX format, as shown below:

alt text

1.1.28

5 months ago

1.1.27

5 months ago

1.1.26

5 months ago

1.1.25

5 months ago

1.1.24

5 months ago

1.1.23

5 months ago

1.1.22

5 months ago

1.1.21

5 months ago

1.1.20

5 months ago

1.1.9

6 months ago

1.1.8

6 months ago

1.1.12

6 months ago

1.1.11

6 months ago

1.1.10

6 months ago

1.1.16

6 months ago

1.1.15

6 months ago

1.1.14

6 months ago

1.1.13

6 months ago

1.1.19

5 months ago

1.1.18

6 months ago

1.1.17

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.91

6 months ago

1.0.94

6 months ago

1.0.93

6 months ago

1.0.92

6 months ago

1.0.99

6 months ago

1.0.98

6 months ago

1.0.97

6 months ago

1.0.96

6 months ago

1.0.62

6 months ago

1.0.66

6 months ago

1.0.65

6 months ago

1.0.64

6 months ago

1.0.63

6 months ago

1.0.69

6 months ago

1.0.68

6 months ago

1.0.67

6 months ago

1.0.73

6 months ago

1.0.71

6 months ago

1.0.70

6 months ago

1.0.77

6 months ago

1.0.76

6 months ago

1.0.75

6 months ago

1.0.74

6 months ago

1.0.79

6 months ago

1.0.78

6 months ago

1.0.80

6 months ago

1.0.84

6 months ago

1.0.83

6 months ago

1.0.82

6 months ago

1.0.81

6 months ago

1.0.88

6 months ago

1.0.87

6 months ago

1.0.86

6 months ago

1.0.85

6 months ago

1.0.89

6 months ago

1.0.90

6 months ago

1.0.61

6 months ago

1.0.60

6 months ago

1.0.44

6 months ago

1.0.48

6 months ago

1.0.47

6 months ago

1.0.46

6 months ago

1.0.45

6 months ago

1.0.49

6 months ago

1.0.51

6 months ago

1.0.50

6 months ago

1.0.55

6 months ago

1.0.54

6 months ago

1.0.53

6 months ago

1.0.52

6 months ago

1.0.59

6 months ago

1.0.58

6 months ago

1.0.57

6 months ago

1.0.56

6 months ago

1.0.43

7 months ago

1.0.41

7 months ago

1.0.40

7 months ago

1.0.39

7 months ago

1.0.38

7 months ago

1.0.37

7 months ago

1.0.36

7 months ago

1.0.35

7 months ago

1.0.34

7 months ago

1.0.33

7 months ago

1.0.32

7 months ago

1.0.31

7 months ago

1.0.30

7 months ago

1.0.29

7 months ago

1.0.28

7 months ago

1.0.27

7 months ago

1.0.26

7 months ago

1.0.25

7 months ago

1.0.24

7 months ago

1.0.23

7 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.20

7 months ago

1.0.19

7 months ago

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago