No Package Mishaps

    @ergatejs/gatsby-source-yuque
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.4 • Public • Published

    gatsby-source-yuque

    Yuque Loader · GitHub license

    Egg.js Semantic Release NPM Version Codecov

    Gatsby source plugin for Yuque.

    Install

    npm install @ergatejs/gatsby-source-yuque

    Usage

    add plugin to your gatsby-config.js

    const dotenv = require("dotenv");
    
    dotenv.config({
      path: `.env.${process.env.NODE_ENV}`,
    });
    
    const YUQUE_GROUP = process.env.YUQUE_GROUP;
    const YUQUE_TOKEN = process.env.YUQUE_TOKEN;
    const YUQUE_ENDPOINT = process.env.YUQUE_ENDPOINT
    
    module.exports = {
      // ...
    
      plugins: [
        // ...
    
        {
          resolve: `@ergatejs/gatsby-source-yuque`,
          options: {        
            queue: {
              concurrency: 20,
            },
            yuque: {
              token: process.env.YUQUE_TOKEN,
              endpoint: process.env.YUQUE_ENDPOINT,
            },
            group: YUQUE_GROUP,
            filter: {
              type: 'Book', // Book | Column
              // slug: 'slug'
            }
          }
        },    
      ],
    };

    Install

    npm i @ergatejs/gatsby-source-yuque

    DownloadsWeekly Downloads

    2

    Version

    1.2.4

    License

    MIT

    Unpacked Size

    73.3 kB

    Total Files

    37

    Last publish

    Collaborators

    • thonatos