@content-island/gatsby-source-plugin
v0.4.0
Published
Content Island - B2B Gatsby Source Plugin
Downloads
33
Readme
@content-island/gatsby-source-plugin
Installation
npm install @content-island/gatsby-source-plugin
Usage
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: '@content-island/gatsby-source-plugin',
options: {
accessToken: process.env.CONTENT_ISLAND_ACCESS_TOKEN,
},
},
],
};
Using with different environments
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: '@content-island/gatsby-source-plugin',
options: {
accessToken: process.env.CONTENT_ISLAND_ACCESS_TOKEN,
domain: process.env.CONTENT_ISLAND_DOMAIN, // Default: api.contentisland.net
apiVersion: process.env.CONTENT_ISLAND_API_VERSION, // Default: 1.0
},
},
],
};
Using with images transformer plugin
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: '@content-island/gatsby-source-plugin',
options: {
accessToken: process.env.CONTENT_ISLAND_ACCESS_TOKEN,
},
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-image',
],
};
Using with markdown transformer plugin
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: '@content-island/gatsby-source-plugin',
options: {
accessToken: process.env.CONTENT_ISLAND_ACCESS_TOKEN,
},
},
'gatsby-transformer-remark',
],
};
NOTE: You can combine images and markdown transformer together.