gatsby-source-qiita
v1.2.4
Published
Gatsby source plugin for building websites using Qiita as a data source.
Downloads
2,293
Maintainers
Readme
gatsby-source-qiita
Source plugin for pulling data into Gatsby from Qiita using the Qiita API v2.
Install
npm install --save gatsby-source-qiita
How to use
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-source-qiita`,
options: {
accessToken: `YOUR_PERSONAL_ACCESS_TOKEN`,
userName: `YOUR_UAWE_NAME`,
// (optional)
// Default is false.
fetchPrivate: false,
// (optional)
// String Array.
// Default is [].
excludedPostIds: ['da8347f81a9f021b637f']
}
}
]
}
How to query
{
allQiitaPost {
edges {
node {
id
title
headings {
value
id
depth
parents {
value
id
depth
}
}
rendered_body
body
comments_count
created_at
likes_count
reactions_count
tags {
name
}
updated_at
url
user {
id
}
}
}
}
}
Sample
- Demo
- https://takumon.github.io/gatsby-starter-qiita/
- Source
- https://github.com/Takumon/gatsby-starter-qiita