Add documentation to a Gatsby site with the Docz Gatsby theme

Kyle Gill
InstructorKyle Gill
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

In this lesson, learn how to quickly add documentation pages to a Gatsby site with Docz's Gatsby theme.

Related Links

Instructor: [00:00] Inside of the Gatsby project, I'm using the default Gatsby starter. Run npm install --save gatsby-theme-docz@next to install the latest version of the docz theme. To verify it installed in your package.json, you should see a version that is at 2.0or higher. Then you can add the theme to your plugins array inside of your Gatsby config file.

[00:23] With the theme added, you can add MDX files that will automatically be turned into docs pages. Add a file alongside the image component called image.mdx with the frontmatter name image and route image. The name will appear in the sidebar. The route is where the page will be set up. You can then add markdown and import components to use inside the page.

[00:42] Start your server with gatsby develop and navigate to the image route. You should see a doc page with the image component.

egghead
egghead
~ 4 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today