@zefman/gridsome-source-instagram
v0.1.3
Published
Gridsome source plugin to load data from Instagram
Downloads
74
Maintainers
Readme
@zefman/gridsome-source-instagram
Instagram source for Gridsome 📸 🏙 🎇 📸
Currently only supports grabbing the latest photos from a user's public instagram profile.
Inspired by Gatsby source instagram
Install
npm install @zefman/gridsome-source-instagram
yarn add @zefman/gridsome-source-instagram
Usage
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
}
}
}
}
}
}
}