@reflexjs/gatsby-theme-doc

0.8.4 • Public • Published

@reflexjs/gatsby-theme-doc

Use this theme to build documentation pages. See example at https://reflexjs.org/docs.

Installation

npm i @reflexjs/gatsby-theme-doc

Configuration

// gatsby-config.js

module.exports = {
  plugins: [`@reflexjs/gatsby-theme-doc`],
}

Options

// gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `@reflexjs/gatsby-theme-doc`,
      options: {
        contentPath: "content/docs",
        basePath: "/docs",
      },
    },
  ],
}

Data models

Doc

type Doc implements Node @dontInfer {
  id: ID!
  title: String
  excerpt: String
  slug: String
  body: String
  tableOfContents: JSON
  timeToRead: Int
}

Usage

Place your docs inside content/docs as follows.

site
  └── content
    └── docs
      └── 01-getting-started.mdx

You must prefix each filename with a number followed by a hyphen (-). This will assign it a weight that will determine its order in the nav.

Then add a nav for your docs inside content/navs as follows.

site
  └── content
    └── navs
      └── doc.mdx

Then add content to your doc:

---
title: A page
excerpt: Omnis architecto praesentium itaque eaque quasi.
---

Write markdown or use components here.

## Heading 2

<Button bg="primary">Button</Button>

Package Sidebar

Install

npm i @reflexjs/gatsby-theme-doc

Weekly Downloads

22

Version

0.8.4

License

MIT

Unpacked Size

23.3 kB

Total Files

15

Last publish

Collaborators

  • arshad