2018-12-10 21:30:34 +01:00
.. _styleguide_basic:
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Basic rules
===========
.. contents ::
:local:
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Use standard American English
-----------------------------
Ansible uses Standard American English. Watch for common words that are spelled differently in American English (color vs colour, organize vs organise, etc.).
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Write for a global audience
---------------------------
Everything you say should be understandable by people of different backgrounds and cultures. Avoid idioms and regionalism and maintain a neutral tone that cannot be misinterpreted. Avoid attempts at humor.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Follow naming conventions
-------------------------
Always follow naming conventions and trademarks.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
.. good place to link to an Ansible terminology page
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Use clear sentence structure
----------------------------
Clear sentence structure means:
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
- Start with the important information first.
- Avoid padding/adding extra words that make the sentence harder to understand.
- Keep it short - Longer sentences are harder to understand.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Some examples of improving sentences:
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Bad:
The unwise walking about upon the area near the cliff edge may result in a dangerous fall and therefore it is recommended that one remains a safe distance to maintain personal safety.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Better:
Danger! Stay away from the cliff.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Bad:
Furthermore, large volumes of water are also required for the process of extraction.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Better:
Extraction also requires large volumes of water.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Avoid verbosity
---------------
Write short, succinct sentences. Avoid terms like:
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
- "...as has been said before,"
- "..each and every,"
- "...point in time,"
- "...in order to,"
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
Highlight menu items and commands
---------------------------------
When documenting menus or commands, it helps to **bold** what is important.
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
For menu procedures, bold the menu names, button names, etc to help the user find them on the GUI:
2017-05-04 22:25:13 +02:00
1. On the **File** menu, click **Open** .
2018-12-10 21:30:34 +01:00
2. Type a name in the **User Name** field.
2017-05-04 22:25:13 +02:00
3. In the **Open** dialog box, click **Save** .
2018-12-10 21:30:34 +01:00
4. On the toolbar, click the **Open File** icon.
2017-05-04 22:25:13 +02:00
2019-09-30 21:11:19 +02:00
For code or command snippets, use the RST `code-block directive <https://www.sphinx-doc.org/en/1.5/markup/code.html#directive-code-block> `_ ::
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
.. code-block :: bash
2017-05-04 22:25:13 +02:00
2018-12-10 21:30:34 +01:00
ssh my_vyos_user@vyos.example.net
show config