When you create a Markdown file (
src/pages/, you can define variables to provide additional information about that page. This information is called front matter and is set between triple dashes starting on the first line of the file:
---title: Example title---
Doctocat recognizes some specific front matter variables described below.
title is used to render the page heading and generate the page title.
description is used to create a meta description tag which is important for SEO. We recommend setting
description for every page:
---title: My page titledescription: My page description---
You can add a status label to any page by setting a
status variable in the frontmatter:
Doctocat comes with a few predefined statuses that have colors associated with them:
Custom statuses will render a gray dot:
Sometimes it's useful to provide quick access to relevant source code. You can use the
source front matter variable to do that:
source front matter variable is defined, Doctocat will add a source code link to the top of the page, like this:
Note: This source code link is not the same as the "Edit this page on GitHub" link that is automatically added to the bottom of every page. The source code link should point to code that is relevant to the page. The "Edit this page on GitHub" link points to the Markdown file for the page itself.
If you have the
gatsby-config.js setup correctly (as desribed in the customization guide), Doctocat will automatically display contributors on the bottom of every page. These contributors are determined by commits. However, we know that commits aren't the only way to contribute. To give credit to people who aren't listed in the commit history but still contributed, use the
additionalContributors front matter variable to list their GitHub usernames, for example:
---additionalContributors:- ashygee- emplums---