Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mottox2/gatsby-source-esa
esa.ioのAPIを叩いてgatsbyで使えるようにするpluginです
https://github.com/mottox2/gatsby-source-esa
esa esa-io gatsby gatsby-plugin gatsby-source
Last synced: 11 days ago
JSON representation
esa.ioのAPIを叩いてgatsbyで使えるようにするpluginです
- Host: GitHub
- URL: https://github.com/mottox2/gatsby-source-esa
- Owner: mottox2
- Created: 2018-04-23T15:20:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T17:22:30.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T05:09:00.924Z (27 days ago)
- Topics: esa, esa-io, gatsby, gatsby-plugin, gatsby-source
- Language: JavaScript
- Homepage:
- Size: 305 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-source-esa
[![npm version](https://badge.fury.io/js/gatsby-source-esa.svg)](https://badge.fury.io/js/gatsby-source-esa)
Source plugin for pulling data into Gatsby from [esa.io](https://esa.io) using the [esa.io API](https://docs.esa.io/posts/102).
## Install
`npm install --save gatsby-source-esa`
## How to use
```js
// 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 docs: 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
```graphql
{
allEsaPost {
edges {
node {
number
name
body_md
body_html
category
relative_category
tags
}
}
}
}
```