npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

gatsby-source-esa

1.1.3 • Public • Published

gatsby-source-esa

npm version

Source plugin for pulling data into Gatsby from esa.io using the esa.io API.

Install

npm install --save gatsby-source-esa

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-esa`,
      options: {
        // You can get an access token from https://[YOUR_TEAM_NAME].esa.io/user/applications.
        // You must be owner role.
        accessToken: `YOUR_PERSONAL_ACCESS_TOKEN`,
        teamName: `YOUR_TEAM_NAME`,
        // Search queary (optional)
        // See :y https://docs.esa.io/posts/104
        // Example : 'in:public'  or 'wip:false in:public'
        q: '',
        // Relative Category (optional)
        // Example: 'public'
        // {
        //   category: 'public/gatsby',
        //   relative_category: 'gatsby',
        // }
        baseCategory: ''
      }
    }
  ]
}

How to query

{
  allEsaPost {
    edges {
      node {
        number
        name
        body_md
        body_html
        category
        relative_category
        tags
      }
    }
  }
}

install

npm i gatsby-source-esa

Downloadsweekly downloads

24

version

1.1.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability