1.1.28 • Published 8 months ago

gatsby-source-notion-churnotion v1.1.28

Weekly downloads
-
License
0BSD
Repository
github
Last release
8 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

8 months ago

1.1.27

8 months ago

1.1.26

8 months ago

1.1.25

8 months ago

1.1.24

8 months ago

1.1.23

8 months ago

1.1.22

8 months ago

1.1.21

8 months ago

1.1.20

8 months ago

1.1.9

8 months ago

1.1.8

8 months ago

1.1.12

8 months ago

1.1.11

8 months ago

1.1.10

8 months ago

1.1.16

8 months ago

1.1.15

8 months ago

1.1.14

8 months ago

1.1.13

8 months ago

1.1.19

8 months ago

1.1.18

8 months ago

1.1.17

8 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.0.91

9 months ago

1.0.94

9 months ago

1.0.93

9 months ago

1.0.92

9 months ago

1.0.99

9 months ago

1.0.98

9 months ago

1.0.97

9 months ago

1.0.96

9 months ago

1.0.62

9 months ago

1.0.66

9 months ago

1.0.65

9 months ago

1.0.64

9 months ago

1.0.63

9 months ago

1.0.69

9 months ago

1.0.68

9 months ago

1.0.67

9 months ago

1.0.73

9 months ago

1.0.71

9 months ago

1.0.70

9 months ago

1.0.77

9 months ago

1.0.76

9 months ago

1.0.75

9 months ago

1.0.74

9 months ago

1.0.79

9 months ago

1.0.78

9 months ago

1.0.80

9 months ago

1.0.84

9 months ago

1.0.83

9 months ago

1.0.82

9 months ago

1.0.81

9 months ago

1.0.88

9 months ago

1.0.87

9 months ago

1.0.86

9 months ago

1.0.85

9 months ago

1.0.89

9 months ago

1.0.90

9 months ago

1.0.61

9 months ago

1.0.60

9 months ago

1.0.44

9 months ago

1.0.48

9 months ago

1.0.47

9 months ago

1.0.46

9 months ago

1.0.45

9 months ago

1.0.49

9 months ago

1.0.51

9 months ago

1.0.50

9 months ago

1.0.55

9 months ago

1.0.54

9 months ago

1.0.53

9 months ago

1.0.52

9 months ago

1.0.59

9 months ago

1.0.58

9 months ago

1.0.57

9 months ago

1.0.56

9 months ago

1.0.43

9 months ago

1.0.41

9 months ago

1.0.40

9 months ago

1.0.39

9 months ago

1.0.38

9 months ago

1.0.37

9 months ago

1.0.36

9 months ago

1.0.35

9 months ago

1.0.34

9 months ago

1.0.33

9 months ago

1.0.32

9 months ago

1.0.31

9 months ago

1.0.30

9 months ago

1.0.29

9 months ago

1.0.28

9 months ago

1.0.27

9 months ago

1.0.26

9 months ago

1.0.25

9 months ago

1.0.24

9 months ago

1.0.23

9 months ago

1.0.22

9 months ago

1.0.21

9 months ago

1.0.20

9 months ago

1.0.19

9 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago