This style guide is a set of guidelines for writing and editing documentation. It's important to follow these guidelines to ensure that our documentation is consistent and easy to read.
Avoid hard-coded examples, and instead import code examples from code that is routinely tested.
Use comments to define code examples to be imported instead of line numbers that may change.
Always wrap inline code in backticks.
Always use code fences when showing commands and separate commands from console outputs. The user should be able to copy and paste the entire code in the code fence.
Use descriptive variable names in code examples. Don’t use foo , bar , baz , etc.
Use the standard HTML heading hierarchy: The first line should be an h1 (use 1 # in markdown) and should be the only h1 on the page. The subheadings shouldn’t skip a level, e.g. h3 tags should only be inside h2 tags.
Organize information so that readers can skim the page and get an answer for the most common questions quickly. Use subheadings to call out important information, and use a blockquote to identify supplemental information.
There are several variables passed into the MDX context that you can use within a guide. You can find a full list in the src/components/MDXRender.tsxIcon Link component.
You can then use these variables within a guide like so:
The faucet URL is {props.faucetUrl}
Which would render as:
The faucet URL is https://faucet-testnet.fuel.network/