@jeff-tian/gatsby-source-yuque
v3.0.3
Published
Source plugin for pulling data into Gatsby from [语雀](https://www.yuque.com) API.
Downloads
45
Maintainers
Readme
gatsby-source-yuque
Source plugin for pulling data into Gatsby from 语雀 API.
Install
npm install --save gatsby-source-yuque
How to use
// In your gatsby-config.js
plugins: [
{
resolve: 'gatsby-source-yuque',
options: {
login: 'raincal',
repo: 'blog',
mdNameFormat: 'title'
}
}
]
Options
| Name | Default | Description |
| -------------- | ------------------------------- | --------------------------------------------------------------------------- |
| baseUrl
| https://www.yuque.com/api/v2/
| base url |
| login
| | user/team unique name |
| repo
| | repo name |
| mdNameFormat
| title
| title
or slug
|
| timeout
| 10000
| timeout
specifies the number of milliseconds before the request times out |
Query for all nodes
{
allYuqueDoc {
edges {
node {
title
slug
cover
description
created_at
childMarkdownRemark {
html
}
}
}
}
}