|
1 | 1 | # Style guide
|
| 2 | +When contributing to the docs, please try to follow the rules in this style guide. |
2 | 3 |
|
| 4 | +## Format for titles and headings |
3 | 5 | Rule | Description |
|
4 | 6 | ---- | ------- |
|
5 | 7 | Title casing for article titles | Use title case for article titles and the nav. <br><br> For example, instead of `Data export options` → use `Data Export Options`.
|
6 |
| -Sentence casing for headings | Article headings should be in sentence case, meaning you only capitalize the first workd and any product names and proper nouns. |
| 8 | +Sentence casing for headings | Article headings should be in sentence case, meaning you only capitalize the first word and any product names and proper nouns. For example: <li> Query the User's Event Traits → Query the user's event traits |
| 9 | + |
| 10 | +## Voice and point of view |
| 11 | +Rule | Description | |
| 12 | +---- | ------- | |
| 13 | +Active voice | Write in active voice whenever possible. Instead of referring to something that will happen (`Segment will create`), rephrase it in the present tense (`Segment creates`). <br><br>Other examples: <li> `You'll see a new dialog` → `A dialog appears` |
| 14 | +Third-person | When referring to ourselves as a company, use *Segment*. Avoid the following: <li> we, we've, we're <br><li>our, ours <br><li>us <br><li>let's <br><br>When referring to a third-party, use a name. Avoid the following: <li> their |
| 15 | + |
| 16 | + |
| 17 | +## Wording rules |
| 18 | +Rule | Description | |
| 19 | +---- | ------- | |
7 | 20 | No latin abbreviations | <li> Instead of `e.g.` → use `for example` <br><li> Instead of `i.e.` → use `that is`, `for example`.
|
8 | 21 | Don't use that → use this | <li> Instead of `blacklist` → use `blocklist` <br><li>Instead of `whitelist` → use `allowlist` <br><li>Instead of `utilize(s)` → use `use(s)` <br><li> Instead of `leverage(s)` → use `use(s)` <br><li>Instead of `via` → use `through`, `using` <br><li>Instead of `drop in` → use `enter` <br><li>Instead of `&` → use `and` <br><li>Instead of `login` → use `credentials`, `account` <br><li>Instead of `setup` → use `configuration`
|
9 |
| -Third-person | When referring to ourselves as a company, use *Segment*. Avoid the following: <li> we, we've, we're <br><li>our, ours <br><li>us <br><li>let's <br><br>When referring to a third-party, use a name. Avoid the following: <li> their |
10 |
| -Active voice | Write in active voice whenever possible. Instead of referring to something that will happen (`Segment will create`), rephrase it in the present tense (`Segment creates`). <br><br>Other examples: <li> `You'll see a new dialog` → `A dialog appears` |
11 | 22 | Correct use of `might`, `may`, `can` | <li>Use `might` when something could possibly happen. For example, “Depending on your configuration, you **might** see different options.” <br><li>Use `may` to grant a user *permission* to do something. For example, "You **may** add optional notes in this section." <br><li>Use `can` to apply the ability to do something. For example, "You **can** use Personas to send data to your marketing tools."
|
12 |
| -Styling Segment Methods | When you refer to a method *outside* of code, use: <li>Page call, Identify call <br><br>Avoid styling like inline code: <li> Page() method <br><li> `page()` <br><li> `.identify()` <br><li> `Identify` call |
13 | 23 | Weasel Words | Avoid words that don't add substance to a sentence. <br><br> For example: `you can run virtually any type of application...` <br><br> The word **virtually** does not contribute to the meaning of the sentence. <br><br> If you're going to add an adverb or adjective to a sentence, make sure it contributes to something.
|
14 |
| -Projecting ease of something | Avoid trying to convey the ease with which something can be accomplished. For example: <li> `You can easily...` <br><li> `With this simple...` <br><br>It's not up to us to determine how difficult or easy someone will find a task. |
15 |
| -Heading case | When adding headings, use sentence-case, not title case. For example: <li> Query the User's Event Traits → Query the user's event traits |
16 | 24 | Contractions | Use contractions. For example, `can't`, `won't`, `haven't`
|
17 |
| -Hyperlinks | Link to the noun or topic of the article rather than `here`. |
18 |
| -Sub-bullets/sub-lists | If there are mutliple tasks within a step, break it up into a sub-list. A single task should be no longer than 3 sentences. |
| 25 | +Using `click` or `select` | Use **click** when a user should take action on a single item. <br><br>Use **select** when the user should pick an item from a list. |
19 | 26 | The use of `At this time`, `Currently` | Generally, don't use such words/phrases, except when the feature is half rolled out or in beta.
|
| 27 | +Projecting ease of something | Avoid trying to convey the ease with which something can be accomplished. For example: <li> `You can easily...` <br><li> `With this simple...` <br><br>It's not up to us to determine how difficult or easy someone will find a task. |
| 28 | +Styling Segment Methods | When you refer to a method *outside* of code, use: <li>Page call, Identify call <br><br>Avoid styling like inline code: <li> Page() method <br><li> `page()` <br><li> `.identify()` <br><li> `Identify` call |
| 29 | +`we` and `they` | Avoid using `we` and `they`. Be explicit about naming who is being referenced. Because Segment has such a large footprint of documentation around third-party integrations, it's important to be very clear about who "we" are in any given part of the doc. Instead of using "we", your should refer to our software or processes in the third person: "Segment creates..." "Segment sends..." |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Formatting |
| 34 | +Rule | Description | |
| 35 | +---- | ----------- | |
20 | 36 | Field names in any app | **Bold** the use of field names.
|
| 37 | +Hyperlinks | Link to the noun or topic of the article rather than `here`. |
| 38 | +Numbers | Use digits/numerals in all cases, except at the beginning of a sentnce. <br><br> For example, instead of `There are five options to choose from.` → use `There are 5 options to choose from.` |
21 | 39 | Entered text in the app | Use `code format`
|
22 |
| -Numbers | Use digits/numerals in all cases, except at the beginning of a sentnce. <br><br> For example, instea of `There are five options to choose from.` → use `There are 5 options to choose from.` |
23 |
| -Screenshots | Use screenshots sparingly. Screenshots are hard to maintain and don't add much value. Confirm that they are essential to understand the feature you're documenting. <br><br>PR reviewers should monitor for screenshots and help determine if they are necessary. |
| 40 | +Capitalization | Capitalize Segment and Segment product names. For example, "privacy" by itself isn't capitalized, but "Segment Privacy Portal" is. Page titles and other UI text should be in lower case. <br><br>Capitalize the words "Sources", "Destinations", and "Warehouses" when referring them as product names (for example: “You can use Sources to…”) but decap them when referring to them generically (“You can connect your warehouse to…”) |
| 41 | +Sub-bullets/sub-lists | If there are mutliple tasks within a step, break it up into a sub-list. A single task should be no longer than 3 sentences. |
24 | 42 | FAQs | Use H4s for FAQs. Don't use the liquid formatting. <b><br>When naming the FAQ section, use `FAQ` instead of `Frequently Asked Questions`.
|
25 |
| -Using `click` or `select` | Use **click** when a user should take action on a single item. <br><br>Use **select** when the user should pick an item from a list. |
26 | 43 |
|
27 | 44 |
|
| 45 | +## Images |
| 46 | +Screenshots | Use screenshots sparingly. Screenshots are hard to maintain and don't add much value. Confirm that they are essential to understand the feature you're documenting. <br><br>PR reviewers should monitor for screenshots and help determine if they are necessary. |
| 47 | + |
| 48 | +Segment Specific Terms |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +<!--- |
28 | 57 | This doc is for keeping track of [style decisions](#style-decisions), [structure decisions](#doc-structure), and [formatting gotchas](#formatting) in the Segment Docs.
|
29 | 58 |
|
30 | 59 | ## Style decisions
|
@@ -178,6 +207,7 @@ To get around this, you can let the previous list item end whereever if needs to
|
178 | 207 |
|
179 | 208 | ```
|
180 | 209 |
|
| 210 | +<!--- |
181 | 211 | Do this with great caution, and only when absolutely necessary. Because you're explicitly setting the numbers, they won't update if you add or delete a step in the auto-numbered list above.
|
182 | 212 |
|
183 | 213 | ### Mixed markdown and HTML
|
@@ -231,6 +261,7 @@ What Paper uses as the "caption" is actually what's specified as the "alt text",
|
231 | 261 |
|
232 | 262 | If you want to preserve this as alt-text, awesome. However, if you want to use this as a "caption", you'll have to copy and paste that text below the image. You can put it in italic format if you'd like.
|
233 | 263 |
|
| 264 | +<!--- |
234 | 265 | ### Code-block cleanup
|
235 | 266 |
|
236 | 267 | By default, Paper uses an old style of markdown that allows you to start a code block by indenting the block. This is rendered okay on our end, but can screw up your code's indentation.
|
|
0 commit comments