Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

@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>
© 2023 Gatsby, Inc.