Instagram source for Gridsome 📸 🏙 🎇 📸
Currently only supports grabbing the latest photos from a user's public instagram profile.
Inspired by Gatsby source instagram
npm install @zefman/gridsome-source-instagram
yarn add @zefman/gridsome-source-instagram
Add the plugin in gridsome.config.js
export default {
plugins: [
{
use: '@zefman/gridsome-source-instagram',
options: {
username: 'zefman', // Instagram username
typeName: 'InstagramPhoto' // The GraphQL type you want the photos to be added under. Defaults to InstagramPhoto
}
}
]
}
Example query to get photos and their caption:
query {
allInstagramPhoto {
edges {
node {
display_url
edge_media_to_caption {
edges {
node {
text
}
}
}
}
}
}
}