✍️ Document write guide
Before getting started, please make sure that you are familiar with
The structure of a document .md
file
To optimize documentation SEO, we should save its metadata between the --- xxx ---
block. Typically used fields are:
title
should be same as the header title;description
field should be the excerpt of the document.
Blocks
Use following components to display more styled content in documentations:
Table
Col1 | Col2 | Col3 |
---|---|---|
Bob | 30 | ✔️ |
Alice | 15 | |
David | 20 | ✔️ |
Code
A code block with copy button.
Hint
Show a hint text with a styled block.
Usage
Props
Name | Type | Default | Description |
---|---|---|---|
type | info | warning | info | Set the hint style |
Doc
A pretty link block to another page.
Usage
Props
Name | Type | Default | Description |
---|---|---|---|
url | string | '' | Set the link url |
title | string | '' | Description of the link title |
Include
Include another markdown and render inline.
Usage
Props
Name | Type | Default | Description |
---|---|---|---|
url | string | '' | Set the markdown file url, which should be an absolute path without the /docs prefix |
How to run the site locally
- Set up your development environment.
- Write the full content in any editor that supports Markdown. e.g. VSCode, Typora, or Notion.
- Run
pnpm dev
start the review server. - Go to localhost:3001/docs and check your creation.
- If everything looks fine, submit a PR with the changes to our repo in GitHub.
How to add a new page
- Add your .md file to the folder
/content/docs/xxx
. - Add your images to the folder
/docs/xxx
. - Add an entry for the document in
_layout.md
, under the proper section. - Submit a PR with the changes to our repo in GitHub.