github.com/eikeon/docker@v1.5.0-rc4/docs/sources/contributing/docs_style-guide.md (about) 1 page_title: Style Guide for Docker Documentation 2 page_description: Style guide for Docker documentation describing standards and conventions for contributors 3 page_keywords: style, guide, docker, documentation 4 5 # Docker documentation: style & grammar conventions 6 7 ## Style standards 8 9 Over time, different publishing communities have written standards for the style 10 and grammar they prefer in their publications. These standards are called 11 [style guides](http://en.wikipedia.org/wiki/Style_guide). Generally, Docker’s 12 documentation uses the standards described in the 13 [Associated Press's (AP) style guide](http://en.wikipedia.org/wiki/AP_Stylebook). 14 If a question about syntactical, grammatical, or lexical practice comes up, 15 refer to the AP guide first. If you don’t have a copy of (or online subscription 16 to) the AP guide, you can almost always find an answer to a specific question by 17 searching the web. If you can’t find an answer, please ask a 18 [maintainer](https://github.com/docker/docker/blob/master/docs/MAINTAINERS) and 19 we will find the answer. 20 21 That said, please don't get too hung up on using correct style. We'd rather have 22 you submit good information that doesn't conform to the guide than no 23 information at all. Docker's tech writers are always happy to help you with the 24 prose, and we promise not to judge or use a red pen! 25 26 > **Note:** 27 > The documentation is written with paragraphs wrapped at 80 column lines to 28 > make it easier for terminal use. You can probably set up your favorite text 29 > editor to do this automatically for you. 30 31 ### Prose style 32 33 In general, try to write simple, declarative prose. We prefer short, 34 single-clause sentences and brief three-to-five sentence paragraphs. Try to 35 choose vocabulary that is straightforward and precise. Avoid creating new terms, 36 using obscure terms or, in particular, using a lot of jargon. For example, use 37 "use" instead of leveraging "leverage". 38 39 That said, don’t feel like you have to write for localization or for 40 English-as-a-second-language (ESL) speakers specifically. Assume you are writing 41 for an ordinary speaker of English with a basic university education. If your 42 prose is simple, clear, and straightforward it will translate readily. 43 44 One way to think about this is to assume Docker’s users are generally university 45 educated and read at at least a "16th" grade level (meaning they have a 46 university degree). You can use a [readability 47 tester](https://readability-score.com/) to help guide your judgement. For 48 example, the readability score for the phrase "Containers should be ephemeral" 49 is around the 13th grade level (first year at university), and so is acceptable. 50 51 In all cases, we prefer clear, concise communication over stilted, formal 52 language. Don't feel like you have to write documentation that "sounds like 53 technical writing." 54 55 ### Metaphor and figurative language 56 57 One exception to the "don’t write directly for ESL" rule is to avoid the use of 58 metaphor or other 59 [figurative language](http://en.wikipedia.org/wiki/Literal_and_figurative_language) to 60 describe things. There are too many cultural and social issues that can prevent 61 a reader from correctly interpreting a metaphor. 62 63 ## Specific conventions 64 65 Below are some specific recommendations (and a few deviations) from AP style 66 that we use in our docs. 67 68 ### Contractions 69 70 As long as your prose does not become too slangy or informal, it's perfectly 71 acceptable to use contractions in our documentation. Make sure to use 72 apostrophes correctly. 73 74 ### Use of dashes in a sentence. 75 76 Dashes refers to the en dash (–) and the em dash (—). Dashes can be used to 77 separate parenthetical material. 78 79 Usage Example: This is an example of a Docker client – which uses the Big Widget 80 to run – and does x, y, and z. 81 82 Use dashes cautiously and consider whether commas or parentheses would work just 83 as well. We always emphasize short, succinct sentences. 84 85 More info from the always handy [Grammar Girl site](http://www.quickanddirtytips.com/education/grammar/dashes-parentheses-and-commas). 86 87 ### Pronouns 88 89 It's okay to use first and second person pronouns. Specifically, use "we" to 90 refer to Docker and "you" to refer to the user. For example, "We built the 91 `exec` command so you can resize a TTY session." 92 93 As much as possible, avoid using gendered pronouns ("he" and "she", etc.). 94 Either recast the sentence so the pronoun is not needed or, less preferably, 95 use "they" instead. If you absolutely can't get around using a gendered pronoun, 96 pick one and stick to it. Which one you choose is up to you. One common 97 convention is to use the pronoun of the author's gender, but if you prefer to 98 default to "he" or "she", that's fine too. 99 100 ### Capitalization 101 102 #### In general 103 104 Only proper nouns should be capitalized in body text. In general, strive to be 105 as strict as possible in applying this rule. Avoid using capitals for emphasis 106 or to denote "specialness". 107 108 The word "Docker" should always be capitalized when referring to either the 109 company or the technology. The only exception is when the term appears in a code 110 sample. 111 112 #### Starting sentences 113 114 Because code samples should always be written exactly as they would appear 115 on-screen, you should avoid starting sentences with a code sample. 116 117 #### In headings 118 119 Headings take sentence capitalization, meaning that only the first letter is 120 capitalized (and words that would normally be capitalized in a sentence, e.g., 121 "Docker"). Do not use Title Case (i.e., capitalizing every word) for headings. Generally, we adhere to [AP style 122 for titles](http://www.quickanddirtytips.com/education/grammar/capitalizing-titles). 123 124 ## Periods 125 126 We prefer one space after a period at the end of a sentence, not two. 127 128 See [lists](#lists) below for how to punctuate list items. 129 130 ### Abbreviations and acronyms 131 132 * Exempli gratia (e.g.) and id est ( i.e.): these should always have periods and 133 are always followed by a comma. 134 135 * Acronyms are pluralized by simply adding "s", e.g., PCs, OSs. 136 137 * On first use on a given page, the complete term should be used, with the 138 abbreviation or acronym in parentheses. E.g., Red Hat Enterprise Linux (RHEL). 139 The exception is common, non-technical acronyms like AKA or ASAP. Note that 140 acronyms other than i.e. and e.g. are capitalized. 141 142 * Other than "e.g." and "i.e." (as discussed above), acronyms do not take 143 periods, PC not P.C. 144 145 146 ### Lists 147 148 When writing lists, keep the following in mind: 149 150 Use bullets when the items being listed are independent of each other and the 151 order of presentation is not important. 152 153 Use numbers for steps that have to happen in order or if you have mentioned the 154 list in introductory text. For example, if you wrote "There are three config 155 settings available for SSL, as follows:", you would number each config setting 156 in the subsequent list. 157 158 In all lists, if an item is a complete sentence, it should end with a 159 period. Otherwise, we prefer no terminal punctuation for list items. 160 Each item in a list should start with a capital. 161 162 ### Numbers 163 164 Write out numbers in body text and titles from one to ten. From 11 on, use numerals. 165 166 ### Notes 167 168 Use notes sparingly and only to bring things to the reader's attention that are 169 critical or otherwise deserving of being called out from the body text. Please 170 format all notes as follows: 171 172 > **Note:** 173 > One line of note text 174 > another line of note text 175 176 ### Avoid excess use of "i.e." 177 178 Minimize your use of "i.e.". It can add an unnecessary interpretive burden on 179 the reader. Avoid writing "This is a thing, i.e., it is like this". Just 180 say what it is: "This thing is …" 181 182 ### Preferred usages 183 184 #### Login vs. log in. 185 186 A "login" is a noun (one word), as in "Enter your login". "Log in" is a compound 187 verb (two words), as in "Log in to the terminal". 188 189 ### Oxford comma 190 191 One way in which we differ from AP style is that Docker’s docs use the [Oxford 192 comma](http://en.wikipedia.org/wiki/Serial_comma) in all cases. That’s our 193 position on this controversial topic, we won't change our mind, and that’s that! 194 195 ### Code and UI text styling 196 197 We require `code font` styling (monospace, sans-serif) for all text that refers 198 to a command or other input or output from the CLI. This includes file paths 199 (e.g., `/etc/hosts/docker.conf`). If you enclose text in backticks (`) markdown 200 will style the text as code. 201 202 Text from a CLI should be quoted verbatim, even if it contains errors or its 203 style contradicts this guide. You can add "(sic)" after the quote to indicate 204 the errors are in the quote and are not errors in our docs. 205 206 Text taken from a GUI (e.g., menu text or button text) should appear in "double 207 quotes". The text should take the exact same capitalisation, etc. as appears in 208 the GUI. E.g., Click "Continue" to save the settings. 209 210 Text that refers to a keyboard command or hotkey is capitalized (e.g., Ctrl-D). 211 212 When writing CLI examples, give the user hints by making the examples resemble 213 exactly what they see in their shell: 214 215 * Indent shell examples by 4 spaces so they get rendered as code blocks. 216 * Start typed commands with `$ ` (dollar space), so that they are easily 217 differentiated from program output. 218 * Program output has no prefix. 219 * Comments begin with # (hash space). 220 * In-container shell commands, begin with `$$ ` (dollar dollar space). 221 222 Please test all code samples to ensure that they are correct and functional so 223 that users can successfully cut-and-paste samples directly into the CLI. 224 225 ## Pull requests 226 227 The pull request (PR) process is in place so that we can ensure changes made to 228 the docs are the best changes possible. A good PR will do some or all of the 229 following: 230 231 * Explain why the change is needed 232 * Point out potential issues or questions 233 * Ask for help from experts in the company or the community 234 * Encourage feedback from core developers and others involved in creating the 235 software being documented. 236 237 Writing a PR that is singular in focus and has clear objectives will encourage 238 all of the above. Done correctly, the process allows reviewers (maintainers and 239 community members) to validate the claims of the documentation and identify 240 potential problems in communication or presentation. 241 242 ### Commit messages 243 244 In order to write clear, useful commit messages, please follow these 245 [recommendations](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message). 246 247 ## Links 248 249 For accessibility and usability reasons, avoid using phrases such as "click 250 here" for link text. Recast your sentence so that the link text describes the 251 content of the link, as we did in the 252 ["Commit messages" section](#commit-messages) above. 253 254 You can use relative links (../linkeditem) to link to other pages in Docker's 255 documentation. 256 257 ## Graphics 258 259 When you need to add a graphic, try to make the file-size as small as possible. 260 If you need help reducing file-size of a high-resolution image, feel free to 261 contact us for help. 262 Usually, graphics should go in the same directory as the .md file that 263 references them, or in a subdirectory for images if one already exists. 264 265 The preferred file format for graphics is PNG, but GIF and JPG are also 266 acceptable. 267 268 If you are referring to a specific part of the UI in an image, use 269 call-outs (circles and arrows or lines) to highlight what you’re referring to. 270 Line width for call-outs should not exceed five pixels. The preferred color for 271 call-outs is red. 272 273 Be sure to include descriptive alt-text for the graphic. This greatly helps 274 users with accessibility issues. 275 276 Lastly, be sure you have permission to use any included graphics.