Skip to content
A Gridsome source to load Instagram data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
.eslintrc.js
.gitignore
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

@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
            }
          }
        }
      }
    }
  }
}
You can’t perform that action at this time.