github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/docs/content/developers/writing-style-guide.md (about)

     1  # Writing Style Guide
     2  
     3  This page formalizes the writing conventions we aspire to use in the documentation.  
     4  It’s a living statement of intent and a reference for all contributors.
     5  
     6  ## Voice and Tone
     7  
     8  In the spirit of the [Code of Conduct](../users/code-of-conduct.md), we want to be clear and encouraging for everyone that bothers to read DDEV’s documentation, rewarding the time and attention they choose to give to it.
     9  
    10  ### Beginner-Friendly, Expert-Compatible
    11  
    12  Write so a DDEV beginner can follow your guidance and a DDEV veteran could use the same content as a reference.
    13  
    14  | Write This 👍 | Not This ❌
    15  | -- | --
    16  | You can run `ddev restart` to apply changes you’ve made to your global `~/.ddev/global_config.yaml` or per-project `.ddev/config.yaml`. | Just `ddev restart` to apply YAML config changes.
    17  
    18  ### Be Efficient and Direct
    19  
    20  Brevity makes for good documentation!
    21  
    22  Few read the docs from start to finish like a book, and explanation can be a barrier to learning. Get to the point, avoiding parentheticals and mid-sentence notes that interrupt the main flow.
    23  
    24  Omit extraneous explanation or decorative language that doesn’t help the reader. Instructions don’t need to include “please”. Provide some context for anchor links without overloading them to hinder flow.
    25  
    26  | Write This 👍 | Not This ❌
    27  | -- | --
    28  | Run `ddev start` and launch the site in a browser. | Please run `ddev start`, then launch the site in a browser.
    29  | Learn more on the [Extending](../users/extend/customization-extendibility.md) page. | (You can also learn more about this and related topics in [Providing Custom Environment Variables to a Container](../users/extend/customization-extendibility.md).)
    30  
    31  ### Avoid “Just” and “Easy”
    32  
    33  Try not to use language that may talk down to the reader. You may intend for “it’s easy” to be reassuring, but it’s a subjective judgment that can convince someone struggling that they’re doing it wrong. Things could instead be “straightforward” if they’re without nuance, “simple” if they don’t involve complex actions or concepts, or “quick” if they involve one or two steps that’d be fast even on someone’s worst day with the slowest-imaginable machine.
    34  
    35  Similarly, “just do X” suggests that “X” should be easy or obvious. Most of the time “just” can be omitted and everyone wins.
    36  
    37  If you’d like to reassure the reader something is easy, illustrate it with a demonstration and let them draw their own conclusion!
    38  
    39  | Write This 👍 | Not This ❌
    40  | -- | --
    41  | Change your project’s PHP version by either editing `.ddev/config.yaml` to set `php_version: "8.2"`, or by running `ddev config --php-version=8.2`, followed by running `ddev restart`. | It’s easy to change your project’s PHP version! Just edit your project’s `.ddev/config.yaml` to set `php_version: "8.2"`, or run `ddev config --php-version=8.2`, followed by running `ddev restart`. |
    42  
    43  ## Writing Style
    44  
    45  DDEV’s documentation should be consistent throughout, which benefits both the reader taking in information and the contributor looking for examples to follow.
    46  
    47  !!!tip "Read It Aloud"
    48      If you get tripped up speaking your words out loud, someone else will get tripped up reading them, too.
    49  
    50  ### Use Correct Capitalization and Punctuation
    51  
    52  Write with appropriate grammar and style for U.S. English, including capitalization and punctuation. Variations in spelling and writing style make the documentation harder to read, and we want to be respectful of the reader’s time and attention.
    53  
    54  | Write This 👍 | Not This ❌
    55  | -- | --
    56  | Let’s not capitalize random words for emphasis. | Let’s not Capitalize random Words for emphasis.
    57  | That organization uses a lovely American color. | That organisation uses a lovely American colour.
    58  | We can use “curly quotes” now that we’re post-typewriter. | We can use "curly quotes" now that we're post-typewriter.
    59  
    60  ### “Run” Commands
    61  
    62  We “run” commands. We don’t “do” them, and the command itself is not a verb. Whenever possible, reinforce that a given thing in backticks is intended as a console command by using the word “run” before it.
    63  
    64  | Write This 👍 | Not This ❌ |
    65  | -- | -- |
    66  | Run `ddev config` to set up your project. | Do `ddev config` to set up your project.<br>You can `ddev config` to set up your project. |
    67  | If you get stuck, run `ddev restart`. | If you get stuck, just `ddev restart`. |
    68  
    69  ### Use Active Third Person
    70  
    71  Avoid impersonal language featuring unknown individuals or shadowy organizations.  
    72  “It is recommended,” for example, could be a warmer “we recommend” or “Laravel users recommend”.
    73  
    74  Write on behalf of the community and not yourself—use “we” and not “I”.
    75  
    76  | Write This 👍 | Not This ❌ |
    77  | -- | -- |
    78  | We recommend Colima for the best performance. | It is recommended for performance that you use Colima. |
    79  | Some prefer Redis for runtime caches. | I like using Redis for runtime caches. |
    80  
    81  ### Write Once and Link
    82  
    83  Try to keep from repeating yourself in the documentation. Instead, write carefully and link to that well-crafted specimen, whether it’s across the page or off to another section. This has two benefits:
    84  
    85  1. Easier maintenance with less chance of redundant information becoming stale.
    86  2. Subtle reinforcement of documentation structure that helps the reader learn where to find answers, rather than answering the same thing in different places.
    87  
    88  ### Mind Your Context
    89  
    90  It’s easy to get lost in documentation; don’t assume the reader is always following your words. Take care to bring the reader with you, especially if there are steps that involve different applications or distinct areas of concern.
    91  
    92  | Write This 👍 | Not This ❌ |
    93  | -- | -- |
    94  | 1. In Docker Desktop, go to *Resources* → *Advanced* and set “Memory” to 6GB.<br>2. From your terminal, run `ddev restart`.<br>3. In your text editor, open `.ddev/config.yaml` and set `php_version: "8.1"`. | 1. Go to *Resources* → *Advanced* and set “Memory” to 6GB.<br>2. Run `ddev restart`.<br>3. Set `php_version: "8.1"`. |
    95  | Once you’ve [installed a Docker provider](../users/install/docker-installation.md), you’re ready to install DDEV! | Docker or an alternative is required before anything will work with DDEV. This is pretty easy on most environments; see the [Docker Installation](../users/install/docker-installation.md) page to help sort out the details.
    96  
    97  ### Avoid Starting with Asides
    98  
    99  The beginning of a page or section should introduce what the rest of the content is about. Try to avoid starting with asides or reminders that get in the way of this initial statement of purpose.
   100  
   101  Never tell the reader to “remember” something they may not have been introduced to yet.
   102  
   103  ### Use Tips
   104  
   105  Avoid using “Note:” to signal an aside. Most sentences work fine without it, and for discreet notes we have `!!!note`, `!!!tip`, and `!!!warning` conventions.
   106  
   107  Use one of these callouts for text that can stand on its own and be skipped, or for an urgent message that needs greater visual emphasis.
   108  
   109  Summarize the callout’s contents with a succinct heading whenever you can, so anyone skimming can know whether to read the callout’s supporting text.
   110  
   111  ```
   112  !!!note "This is a note."
   113      Use it for extraneous asides.
   114  
   115  !!!tip "This is a tip."
   116      Use it for helpful asides.
   117  
   118  !!!warning "This is a warning."
   119      Use it for asides that should have urgent emphasis.
   120  
   121  !!!note
   122      This is a note without a heading, which should only be used with the author isn’t clever enough to come up with a succinct one. (The “Note” is added automatically.)
   123  ```
   124  
   125  !!!note "This is a note."
   126      Use it for extraneous asides.
   127  
   128  !!!tip "This is a tip."
   129      Use it for helpful asides.
   130  
   131  !!!warning "This is a warning."
   132      Use it for asides that should have urgent emphasis.
   133  
   134  !!!note
   135      This is a note without a heading, which should only be used with the author isn’t clever enough to come up with a succinct one. (The “Note” is automatically added.)
   136  
   137  **Note:** we want to avoid callouts like this sentence, that should either be tips or flow naturally with their surrounding text. If any documentation *shouldn’t* be noted by the reader, get rid of it.
   138  
   139  ### Use Correct Proper Nouns
   140  
   141  #### DDEV != `ddev`
   142  
   143  DDEV is a product and `ddev` is a binary or console command. DDEV should always be uppercase, and `ddev` should always be in backticks. DDEV-Local and DDEV-Live are former product incarnations that shouldn’t be found in modern documentation.
   144  
   145  | Write This 👍 | Not This ❌
   146  | -- | --
   147  | DDEV is wonderful! | Ddev is wonderful!<br>ddev is wonderful!<br>DDEV-Local is wonderful!
   148  | Run `ddev`. | Run ddev.<br>Run DDEV.
   149  
   150  #### Products, Organizations, and Protocols
   151  
   152  When in doubt, honor whatever name a product or organization uses in its official materials.  
   153  Use backticks to differentiate between a product and command, just like DDEV vs. `ddev`.
   154  
   155  | Write This 👍 | Not This ❌
   156  | -- | --
   157  | AMD64, ARM64, and Apple Silicon | amd64, arm64, M1 Macs
   158  | Apache | apache
   159  | Bash or `bash` | bash
   160  | Blackfire | blackfire, Blackfire.io
   161  | Chocolatey | chocolatey
   162  | Colima or `colima` | colima
   163  | Composer or `composer` | composer
   164  | Docker or `docker` | docker
   165  | Drush or `drush` | drush
   166  | Git | git
   167  | Git Bash | git bash
   168  | GitHub or `github` | Github
   169  | Gitpod or `gitpod` | Gitpod.io, GitPod
   170  | GoLand | Goland
   171  | Google | google
   172  | Homebrew | homebrew
   173  | HTTP, HTTPS, SSH, `http`, `https`, `ssh` | http, https, ssh
   174  | IPv4, IPv6 | IPV4, IPV6, ipv4, ipv6
   175  | Linux | linux
   176  | nginx or `nginx` | Nginx, NGINX
   177  | Node.js or `node` | Node, node
   178  | NFS | nfs
   179  | Pantheon | pantheon, Pantheon.io
   180  | PHP or `php` | php
   181  | PhpStorm | PHPStorm, PHPstorm, Phpstorm
   182  | PHPUnit or `phpunit` | phpunit, PHPunit
   183  | PostgreSQL | Postgres
   184  | Terminus | terminus
   185  | Windows | windows
   186  | Xdebug | XDebug, xDebug
   187  
   188  ### Quote Copied Text
   189  
   190  If you’re quoting a human being or a message lifted verbatim from some other source (outside a fenced code block), make sure it ends up in a `<blockquote>` element:
   191  
   192  ```
   193  > Error: your quote style should not always be in a fenced block.
   194  ```
   195  
   196  > Error: your quote style should not always be in a fenced block.
   197  
   198  ### Other Recommendations
   199  
   200  One-off tips that don’t fit nicely into any of the sections above:
   201  
   202  - Pluralize “CMS” as “CMSes”, not “CMSs”.
   203  - Use all-caps references for file *types* like JSON, YAML and CSS.
   204  - Wrap file *extensions* in backticks like `.json`, `.yaml`, and `.css`.
   205  - Wrap references to files, directories, images and commands in backticks.
   206  - Use Title Case for headings wherever it makes sense.
   207  - Link to related services and topics where convenient—usually first use on a given page.
   208  - Use `<kbd>` elements for representing literal keystrokes.
   209  - Use sequential numbers for numbered lists in the source Markdown, regardless of how they’re eventually rendered.
   210  - Try to maintain parallel format for list items.
   211  
   212  | Write This 👍 | Not This ❌ |
   213  | -- | -- |
   214  | web server | webserver
   215  | add-on | addon
   216  | JSON, YAML, CSS | json, Yaml, css
   217  | `.json`, `.yaml`, `.css`, `~/.ddev` | .json, .yaml, .css, ~/.ddev
   218  | <kbd>CTRL</kbd> + <kbd>C</kbd> | control-c, control + c, ctrl+c
   219  | *Menu Item* → *Another Menu Item* → *Setting* | Menu Item>Another Menu Item>Setting<br>Menu Item -> Another Menu Item -> Setting
   220  | several CMSes | several CMSs, several CMS’s
   221  | How to Reticulate Splines | How to reticulate splines
   222  | 1. Run `command`.<br>2. Edit file.<br>3. Restart computer. | 1. `command`<br>2. Edit file.<br>3. Additionally, restart your computer.