Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 525 Bytes

readme.md

File metadata and controls

26 lines (24 loc) · 525 Bytes

Pull data from a JSON API endpoint and turn into Gatsby nodes

Install

npm i gatsby-source-json

Usage

plugins: [
  resolve: 'gatsby-source-json',
  options: {
    // name the gatsby node
    name: 'Articles',
    // url for JSON endpoint
    uri: 'www.example.com/example.json',
    // Basic Auth if required (optional)
    auth: {
      username: 'userename',
      password: 'password'
    },
    // image location to process images. Default: "image.url"
    image_location: "image.url",
  }
]