Skip to content

Commit

Permalink
Document how to structure references (#819)
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry authored Dec 6, 2024
1 parent 305f989 commit fdbc047
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/sources/write/style-guide/write-for-developers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For dos and don'ts of writing comments, refer to the [Guidelines for code commen

For more general advice, consult one of the reputable [Google Style Guides](https://google.github.io/styleguide/) for your programming language.

## Reference docs
## Reference documentation

Whenever possible, automatically generate API and other reference documentation from source-code comments.
However documentation is created, make sure it conforms to the [style conventions](https://grafana.com/docs/writers-toolkit/write/style-guide/style-conventions/).
Expand Down Expand Up @@ -85,6 +85,14 @@ Additional tips:
For example, don't change `MyEvent` to `MyEvents`; refer to the `MyEvent` objects.
- If the element does some sort of action, start the first sentence of the description with an action verb.

### Reference structure

Organize references alphabetically, organizing by frequency of use is too subjective.

If the reference has required and optional components, document them separately.
Document the required components first, then the optional components.
Organize each set of components alphabetically.

## Code examples

Readers of documentation typically skim through it to find code samples they can copy and paste and run as is.
Expand Down

0 comments on commit fdbc047

Please sign in to comment.