@jeff-tian/gatsby-source-yuque

3.0.3 • Public • Published

gatsby-source-yuque

NPM version LICENSE version

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
        }
      }
    }
  }
}

LICENSE

MIT

Package Sidebar

Install

npm i @jeff-tian/gatsby-source-yuque

Weekly Downloads

26

Version

3.0.3

License

MIT

Unpacked Size

60 kB

Total Files

31

Last publish

Collaborators

  • jeff-tian