Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update writing guide #2373

Merged
merged 4 commits into from
Apr 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions website/docs/contributing/writing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,38 @@ draft: true

# Writing guide

## Front matter

The front matter represents the metadata for each page.
It is written at the top of each page and must be enclosed by `---` on both sides.

Example:

```yaml
---
sidebar_position: 1
description: How to write documentation
---
```

Learn more about [front matter in Docusaurus](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter).

## Names and URLs

Use `kebab-case-with-dashes` instead of `snake_case_with_underscores` or spaces
for file names, directory names, and slugs because URL paths typically use dashes.

Ensure that the file name/URL path matches the title of the page.
For example, if the title of your page is "Getting Started", then the file name/URL path should also be "getting-started" to maintain consistency.
It is recommended to omit the `slug` field from the front matter, since the file name is used by default as the URL path.
Only use the `slug` field in some special cases, such as when creating custom or external links, or for backward compatibility with existing links.

## Sidebar position

Use the `sidebar_position` in the front matter to set the order of the pages in the sidebar.
Please ensure that the `sidebar_position` is unique for each page in that directory.
For example, if there are several pages in the folder "Getting Started", let `sidebar_position` equal "1", "2", "3", "4", and so on to avoid duplication.

## Headers

Use sentence case for headers: `### Some header with URL`, not `### Some Header With URL`.
Expand Down