0.0.2 • Published 1 year ago

gatsby-source-mystrapi v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

gatsby-source-mystrapi

Project Url: https://github.com/denghuiquan/gatsby-source-mystrapi

gatsby-source-mystrapi

Source plugin for pulling documents into Gatsby from a Strapi API.

⚠️ This version of gatsby-source-mystrapi is only compatible with Strapi v4.

A gatsby-config.js example:

require('dotenv').config({
  path: `.env.${process.env.NODE_ENV}`
})

const strapiConfig = {
  apiURL: process.env.STRAPI_API_URL,
  accessToken: process.env.STRAPI_TOKEN,
  singleTypes: ['general'],
  collectionTypes: ['post', 'tag']
}

/**
 * @type {import('gatsby').GatsbyConfig}
 */
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-source-mystrapi',
      options: strapiConfig
    }
  ]
}
0.0.2

1 year ago

0.0.1

1 year ago