Docs: Update documentation-style-guide.md (#21322)

* Update documentation-style-guide.md

Added Commands and code section.

* Update documentation-style-guide.md

* Update documentation-style-guide.md

Added code block examples

* Update documentation-style-guide.md
This commit is contained in:
Diana Payton 2020-01-10 11:53:05 -08:00 committed by GitHub
parent a7509d2ca0
commit cfba25630e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,30 @@ Always give the reader some idea of what to expect in the reference. Avoid blind
When possible, use the exact title of the page or section you are linking to as the link text.
**Example**
* Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
### Command line examples
* Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
* Do not add `$` before commands. Make it easy for users to copy and paste commands.
* **Wrong:** `$ sudo yum install grafana`
* **Right:** `sudo yum install grafana`
* Include `sudo` before commands that require `sudo` to work.
For terminal examples and Grafana configuration, use a `bash` code block:
```bash
sudo yum install grafana
```
For HTTP request/response, use an `http` code block:
```http
GET /api/dashboards/id/1/permissions HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Word usage