gatsby-source-kdc-cms

0.1.4 • Public • Published

gatsby-source-kdc-cms

contributions welcome

https://nodei.co/npm/gatsby-source-kdc-cms.png?downloads=true&downloadRank=true&stars=true

Source plugin for pulling documents into Gatsby from a KDC CMS API.

Install

npm install --save gatsby-source-kdc-cms

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-kdc-cms`,
    options: {
      apiURL: `http://localhost:8101`,
      queryLimit: 100, // Default to 100
      contentTypes: [`pages`, `contents/blog`], // these are your content type id
      jwtToken: process.env.KDC_CMS_TOKEN
    }
  }
];

How to query

You can query Document nodes created from your KDC CMS API like the following:

{
  allKdccmsBlog {
    edges {
      node {
        id
        title
        subtitle
      }
    }
  }
}

Example

For a full working example using this plugin, see gatsby-blog-kdc-cms

Package Sidebar

Install

npm i gatsby-source-kdc-cms

Weekly Downloads

2

Version

0.1.4

License

MIT

Unpacked Size

12.7 kB

Total Files

9

Last publish

Collaborators

  • ianpogi5