JSPM

gatsby-source-docsie

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q20785F
  • License 0BSD

A plugin for sourcing Docsie content

Package Exports

  • gatsby-source-docsie
  • gatsby-source-docsie/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gatsby-source-docsie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Description

This plugin adds Docsie content to your GatsbyJs website. It can auto generate pages or you can query the graphql yourself to have more control over page creation.

How to Install

npm install gastby-source-docsie

How to Use

Add the plugin to your gatsby-config.js file.

{
  resolve: require.resolve(`gatsby-source-docsie`),
  options: {
  	deploymentId: "deployment_iigwE2dX4i7JVKmce", [required]
    generatePages: true, [optional, defaults to true]
    path: "docs", [optional, root path for slugs of all nodes, no slashes needed, defaults to docs]
    language: "English", [optional, if not provided defaults to primary language]
  }
}

With Page Generation

By default the plugin auto-generates pages.

You can style the default pages using the following CSS classes:

  • .docsie-main-container
  • .docsie-nav-container
  • .docsie-page-container
  • .docsie-nav
  • .docsie-nav-items
  • .docise-nav-item

Without Page Generation

If you need a little more control on how the content is generated, you can set generatePages above to false, and fetch the data directly from GatsbyJs using graphql.

The plugin adds 4 graphql nodes to GatsbyJs:

  • DociseDoc
  • DociseBook
  • DocsieArticle
  • DocsieNav

You can find an example of how to generate pages in /plugin/createPages.js, and you can also look at /plugin /DocsieTemplate.js for an example of how to build React components.