Cheat sheet: writing a page inside /docs
/docs
What is this: A few rules about headings, internal linking, images and more that we kept in mind. It's how we did it.
For who: Anyone documenting in the KERI Suite and WOT-terms repo specifically.
What problem does it solve: Everything that is important to do the right way, but you keep forgetting how to do it. Here's the cheat sheet to remind you and assist you.
What's the result: The KERI Suite uses Docusaurus to generate enhanced technical documentation. Complying with the rules in this cheat sheet means optimal readability, less broken links, well-styled images, etc.
Strongly recommended
Use an editor that fixes markdown links when changing file names or moving files. We recommend Visual Studio Code.
Change default setting in Visual Studio Code:
-
Go to preferences
-
Type in search field: “markdown link update”
-
Set to “prompt” or “always”
(This video explains.
General
Use empty lines between every block:
Right:
```
Main title
Subtitle
A paragraph text
Another paragraph text ```
```
Main title
Subtitle
A paragraph text
Another paragraph text ```
Wrong:
```
Main title
Subtitle
A paragraph text Another paragraph text ```
```
Main title
Subtitle
A paragraph text Another paragraph text ```
Headings
Start a page with a # followed by a space.
```
```
(If you start with a ## then Docusaurus will ad a # based on the file name. Not desirable.)
```
```
```
```
Example:
Main title
```
Main title
```
This will result in a
in the final html after the Markdown is parsed.
```
```
```
```
```