@instadukan/gatsby-source-instadukan
v0.0.1
Published
Gatsby source plugin for building websites using instadukan as a data source
Downloads
9
Maintainers
Readme
gatsby-source-instadukan
Source plugin for pulling documents into Gatsby from a instadukan API.
Install
npm install --save gatsby-source-instadukan
How to use
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-source-instadukan`,
options: {
apiURL: `http://localhost:1337`,
queryLimit: 1000, // Default to 100
contentTypes: [`posts`],
businessId:1,
// Possibility to login with a instadukan user, when content types are not publically available (optional).
loginData: {
identifier: "",
password: "",
},
},
},
]
How to query
You can query Document nodes created from your instadukan API like the following:
{
allInstadukanArticle {
edges {
node {
id
title
content
}
}
}
}
To query images you can do the following:
{
allInstadukanArticle {
edges {
node {
id
singleImage {
publicURL
}
multipleImages {
localFile {
publicURL
}
}
}
}
}
}