Skip to main content
K
Last modified: 4/Oct/2024

Documenting your work

We have put a lot of work into developing a searchable, transparent and easy-to-use documentation system. This is because we take documentation very seriously.

#Create a documentation page

It's really simple: you just need to create a markdown file anywhere in the repository, and provide some simple metadata. Our system will find the file anywhere, but we strongly recommend to place it into one of our corresponding packages. If it is common information you can put it into ./packages/core/docs.

The file extension can be .mdx too, but if you want to use an external component in MDX, you need to set it up in ./docs/site/components/documentation/DocPage.tsx.

#Providing metadata

We use front-matter to make our system work. You have to add the path variable in order to see the page in the Next.js routing.

--- path: user-guide/getting-started/my-page ---

The above setting will place the page in the USER GUIDE / Getting Started / My Page place to the sidebar. The first section of the path will decide the category. Currently, we have just two categories: user-guide and developer-guide. You must begin your path with these sections to make them appear in the corresponding category.

#Title

If you want to overwrite the generated title on the sidebar, you can use the sidebarTitle variable:

--- # By default, the title would be "My Awesome Component", but we overwrote it. path: user-guide/my-awesome-component sidebarTitle: MyExceptionalComponent ---

#Hidden pages

You can make "hidden" pages by adding them into a non-existing category, or passing the hideFromNavigation variable to the metadata.

--- # This page will not show on the sidebar path: user-guide/getting-started/my-secret-page hideFromNavigation: true ---

#Page order

You can order the pages on the sidebar, by providing a weight variable. Greater values will appear higher on the sidebar. If one of the pages in a category has greater value than every page in another category, the whole category will move higher.