You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/connect/contribute/style-guide.mdx
+33-29
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,12 @@ description: This guide explains how to write technical content for Optimism Doc
6
6
7
7
import { Callout } from'nextra/components'
8
8
9
-
# Docs Style Guide
9
+
# Docs style guide
10
10
11
11
This Style Guide aims to assist Optimists in writing technical content with a consistent voice, tone, and style. See the [glossary](/connect/resources/glossary) for an alphabetical listing of commonly used words, terms, and concepts used throughout the technical docs and across the OP Collective.
12
12
13
+
This doc doesn't cover all questions or use-cases. Our guide is based off the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/). Please reference their guide for any use-case or situation we do not cover here.
14
+
13
15
* For docs-related questions or comments, create an issue in the [docs repo](https://github.com/ethereum-optimism/docs/issues).
14
16
* For support-related questions or comments, create an issue in the [developers repo](https://github.com/ethereum-optimism/developers/issues).
15
17
@@ -23,9 +25,9 @@ This Style Guide aims to assist Optimists in writing technical content with a co
23
25
*[Content Types](#content-types)
24
26
*[General Formatting](#general-formatting)
25
27
26
-
## Files, Folders, and Naming Conventions
28
+
## Files, folders, and naming conventions
27
29
28
-
### Folder Structure
30
+
### Folder structure
29
31
30
32
The folder structure for the [docs.optimism.io](https://github.com/ethereum-optimism/docs) repository is organized into several high-level categories under the main `pages` folder such as `builders`, `chain`, `connect`, and `stack`.
31
33
@@ -41,19 +43,19 @@ In general, filenames should be as short as possible (\~2 to 4 words) and all lo
41
43
42
44
**Example:**`writing-a-guide.mdx` or `run-node.mdx`
43
45
44
-
### File Paths
46
+
### File paths
45
47
46
48
File paths, when mentioned **within** a docs page, should be formatted as code snippets for readability and wrapped in backticks.
47
49
48
50
**Example**: `/source/docs/assets/images/`
49
51
50
-
## Writing Style
52
+
## Writing style
51
53
52
-
### Voice and Tone
54
+
### Voice and tone
53
55
54
56
Write in a friendly, yet professional tone. We are upbeat, knowledgeable, and **optimistic** about the development of the Optimism Collective, which we try our best to convey in our technical documentation.
55
57
56
-
### Clear and Concise Language
58
+
### Clear and concise language
57
59
58
60
* Be consistent. Use the same terminology, voice, and tone throughout the documentation.
59
61
* Be concise. Focus on providing key information and avoid including superfluous information.
@@ -67,7 +69,7 @@ Write in a friendly, yet professional tone. We are upbeat, knowledgeable, and **
67
69
68
70
See below for when to use title or sentence case.
69
71
70
-
* Avoid using all caps as it slows down reading comprehension. If you need to make content prominent, use **bold** rather than all caps or italics.
72
+
* Avoid using all caps as it slows down reading comprehension.
71
73
72
74
* Capitalize proper nouns in sentences. <br />
73
75
**Example**: I use Visual Studio on my local machine.
@@ -110,20 +112,20 @@ When creating content, ensure it is accessible to screen-reader users, visually
110
112
* Don't use images of text, code samples, or terminal output. Use actual text.
111
113
* Use SVG instead of PNG if available. SVGs stay sharp when users zoom in on the image.
112
114
113
-
## Content Organization
115
+
## Content organization
114
116
115
117
We aim to use consistent organization that is also user-centered and accessible. This requires intentional work and planning to group technical content into sections instead of using long, dense paragraphs. This also gives readers a visual rest from a usability perspective and improves reading comprehension.
116
118
117
119
* Use structured headings (H1, H2 or #, ##) to guide readers through the technical documentation.
118
120
* Use numbered lists for chronological steps.
119
121
* Use bulleted lists to visually separate content that does not require a specific order.
120
-
* Format text for optimal readability (bold vs. italics). Avoid using italics in web content as it decreases readability. Use bold if you need to make content prominent but use it sparingly. For instance, **bold** is appropriate to use when referring to a specific button or page name in technical documentation.
122
+
* Format text for optimal readability (bold vs. italics). Avoid using italics in web content as it decreases readability. For instance, **bold** is appropriate to use when referring to a specific button or page name in technical documentation.
121
123
* Organize technical content to cover only one major concept or task at a time.
122
-
***General rule of thumb**: documents with > 3 levels of structured headings (H4 or ####) and/or > than 20 minutes estimated reading time (ERT) need Revisions will typically involve editing for conciseness, splitting the document into multiple pages, or both.
123
-
*revisions will usually require editing for concision, breaking the document apart into multiple pages, or some combination of the two.
124
+
***General rule of thumb**: documents with more than 3 levels of structured headings (H4 or ####) and/or more than than 20 minutes estimated reading time (ERT) need revisions will typically involve editing for conciseness, splitting the document into multiple pages, or both.
125
+
*Revisions will usually require editing for concision, breaking the document apart into multiple pages, or some combination of the two.
124
126
* Organize content based on the audience's varying needs and prior knowledge. If pre-requisite knowledge is necessary to complete a task or understand a concept, then share it with users (including links to learn more), so they can easily get up to speed.
125
127
126
-
### Meta Tags
128
+
### Meta tags
127
129
128
130
* Define the meta **title**, **language**, and **description** for each page to improve SEO ranking of the docs. Place meta tags at the top of the page before the H1 tag, with 3 dashes surrounding the block of text on either side.
129
131
@@ -147,7 +149,7 @@ We aim to use consistent organization that is also user-centered and accessible.
147
149
—-<br />
148
150
</Callout>
149
151
150
-
### Page Titles (H1)
152
+
### Page titles (H1)
151
153
152
154
* Create concise page titles and format as H1. The title should be able to fit on 1-2 lines.
153
155
* Every page must have an H1 heading, in addition to the page title being defined in the SEO meta tags.
@@ -169,11 +171,11 @@ We aim to use consistent organization that is also user-centered and accessible.
169
171
170
172
* Use headings in a logical manner, and the site will automatically generate anchor links for H2 and H3 tags and place them in a Table of Contents (TOC) in the right column.
171
173
172
-
* Avoid H4 levels and above within guide and template pages. As stated elsewhere in this style guide, technical documents with > 3 levels of structured headings (H4 or ####) usually indicates clarity, organization, or structural issues and should be revised.
174
+
* Avoid H4 levels and above within guide and template pages. As stated elsewhere in this style guide, technical documents with more than 3 levels of structured headings (H4 or ####) usually indicates clarity, organization, or structural issues and should be revised.
173
175
174
176
* H4 headings are reserved (at this time) for glossary terms. This standardization will make it easier for us to extend glossary functionality across the docs in the future, such as tool tips.
175
177
176
-
### Listing Prerequisites (Before You Begin)
178
+
### Listing prerequisites (Before you begin)
177
179
178
180
* Add a "Before You Begin" section at the top of the document if there are tasks a user needs to complete before continuing with the current task, e.g. installing a module, downloading a software update, etc.
179
181
* Use the title "Before You Begin"and format as H2. It should follow the page overview/intro section or table of contents.
@@ -186,7 +188,7 @@ We aim to use consistent organization that is also user-centered and accessible.
186
188
187
189
### Callouts
188
190
189
-
* Use callouts to direct users to information necessary to complete a task or information of special importance. When adding a callout to a document, use sentence case and use bold text sparingly.
191
+
* Use callouts to direct users to information necessary to complete a task or information of special importance. When adding a callout to a document, use sentence case.
190
192
* Use the correct callout type based on the type of issue: a) info/general, b) warning, c) error. Our documentation platform supports 4 different callout types.
191
193
* The default and info callouts are used to share non-sensitive, non-breaking info with users, such as suggestions or best practices that might make the installation or deployment easier.
192
194
<Callouttype="info">
@@ -207,7 +209,7 @@ We aim to use consistent organization that is also user-centered and accessible.
207
209
</Callout>
208
210
* Use callouts sparingly as too many can be confusing to readers. **As a general rule of thumb:** pages with more than 2 callouts likely needs revision and/or a discussion with an Optimism developer or product manager to ensure guide content accuracy.
209
211
210
-
### Code Samples
212
+
### Code samples
211
213
212
214
* Use code samples as often as possible to help explain concepts. Can be used in guides or tutorials, but every tutorial should have at least one code sample to be useful to developers.
213
215
* Any bits of code should be wrapped in backticks and use built-in syntax highlighting. Most documentation platforms automatically apply syntax highlighting when properly defined inside the code block.
@@ -231,7 +233,7 @@ console.log('hello, world')
231
233
* adding or showing the line numbers within the code block (easily refer to a certain code lines within the documentation)
232
234
* highlighting lines or strings in the code block to draw user's attention to specific areas
233
235
234
-
### Images, Screenshots, & Icons
236
+
### Images, screenshots, & icons
235
237
236
238
* Images, screenshots, and icons are stored in the `public/img` directory in the root folder.
237
239
* Every image and screenshot should have descriptive alt text.
@@ -280,7 +282,7 @@ clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allo
280
282
281
283
Developers trust that we will lead them to sites or pages related to their reading content. In order to maintain that trust, it's important that links are transparent, up-to-date, and lead to legitimate resources.
282
284
283
-
### Internal Links
285
+
### Internal links
284
286
285
287
* Internal links are automatically generated based on the H2 and H3 title tags.
286
288
@@ -292,7 +294,7 @@ Developers trust that we will lead them to sites or pages related to their readi
292
294
293
295
* To link to an anchor, such as an H3 tag within a page, you need to append it to the page name preceded by `#`, like this **example**: `[any descriptive text](/chain/getting-started/overview#test-your-application)`.
294
296
295
-
### Linking Across Pages
297
+
### Linking across pages
296
298
297
299
* Use absolute or relative links when linking across pages in the site. Absolute links are cleaner and easier to work with when pages are nested, so they are the recommended option.
298
300
@@ -314,7 +316,7 @@ Developers trust that we will lead them to sites or pages related to their readi
314
316
315
317
**Example**: For more information, see [Article Title](/builders/app-developers/bridging/standard-bridge).
316
318
317
-
## Content Types
319
+
## Content types
318
320
319
321
Content types help manage technical content by defining the purpose and common structure for each file type. All content types used in these technical docs have attributes or properties, as defined below.
320
322
@@ -356,9 +358,9 @@ To maintain consistency, guides should include all these items:
356
358
* one or more visual elements (e.g., images, screenshots, illustrations, and/or code samples)
357
359
* next steps section: links to related tutorials, other guides, troubleshooting, etc.
358
360
359
-
### Quick Starts
361
+
### Quick starts
360
362
361
-
A Quick Start Guide should be brief (thus "quick"), easy to read, and focused on helping customers get started with only the basics of your product or service. It is usually a condensed version of a longer getting started guide (or a longer tutorial), so it is not a replacement but an accompaniment or companion piece to the docs set.
363
+
A Quick start guide should be brief (thus "quick"), easy to read, and focused on helping customers get started with only the basics of your product or service. It is usually a condensed version of a longer getting started guide (or a longer tutorial), so it is not a replacement but an accompaniment or companion piece to the docs set.
362
364
As a rule, this content type should describe only one scenario. It's value lies in its simplicity and ability to speed up onboarding (e.g., installation, deployment, etc.) and developers' first steps, thus improving the developer experience.
363
365
364
366
To maintain consistency, quick start guides should include these items:
@@ -403,6 +405,8 @@ When writing tutorials or quick starts, steps should be written in parallel styl
403
405
404
406
### FAQs
405
407
408
+
Whenever possible, we should avoid using FAQs due to their lack of readability and difficulty of maintenance.
409
+
406
410
FAQs address common questions developers have/might ask about a product, feature, or service. FAQs should be written from the developer's perspective. If there are more than two steps in the answer, use a numbered list. Place FAQs onto their own separate pages, whenever possible, and link to the FAQ from within the respective guide or tutorial.
407
411
408
412
To maintain consistency, FAQs should include all of these items:
@@ -433,7 +437,7 @@ The heading level for FAQs will vary based on if it's an FAQ-only doc or if FAQs
433
437
434
438
Include a category heading when you need to group related FAQ content (e.g., See the Optimism Glossary for a detailed example). Category headings are optional, but helpful, for longer FAQs.
435
439
436
-
### Troubleshooting Guides
440
+
### Troubleshooting guides
437
441
438
442
Troubleshooting guides list common problems a developer might encounter while using a product or service, identifies the symptoms, and offers solutions to these problems. It is important to accurately capture symptoms produced by the system or interface (e.g., error messages, unexpected page refresh/reload, spinning wheel, etc.), so developers know if their system response aligns with one of the common problems identified in the troubleshooting guide.
439
443
@@ -448,7 +452,7 @@ To maintain consistency, troubleshooting guides should include all of these item
448
452
* solution (step-by-step)
449
453
* next steps section: links to related tutorials, other guides, etc.
450
454
451
-
### Technical Reference
455
+
### Technical reference
452
456
453
457
Technical references provide deep, theoretical knowledge of the internal workings of a system. These often come in the form of requirements or system specifications developers need to run the product efficiently, so lists and tables, such as API endpoints and error codes are commonplace.
454
458
A technical reference page is usually quite long, so it is best practice to embed a table of contents (TOC) at the top of the page to help organize material for developers. From a usability perspective, this practice shows developers what will be covered in the reference in advance, and allows them to jump to a specific section, if desired.
@@ -463,17 +467,17 @@ To maintain consistency, technical references should include all these items:
463
467
464
468
Technical references often include more links throughout the document than other content types, often linking to other technical references, guides, tutorials, glossary definitions, etc. Since the purpose of technical reference material is to educate developers on a deeper level about the topic of their choosing, this is a common and expected practice and is a good indication of a strong technical reference.
465
469
466
-
## General Formatting
470
+
## General formatting
467
471
468
472
### Fonts
469
473
470
474
Fonts in Optimism technical documentation are setup to follow brand guidelines established by marketing (e.g., heading fonts are different than body or paragraph font). Please do not change them.
471
475
472
-
### Bullets & Unordered Lists
476
+
### Bullets & unordered lists
473
477
474
478
Please use `*` instead of `-` for items in a list. This maintains consistency across the docs.
475
479
476
-
### Date & Numbers
480
+
### Date & numbers
477
481
478
482
* Use the full month, day, year format for dates whenever possible. Do not abbreviate the month. In a form or when space is limited, use slashes in the format of month/day/year without any leading zeros.
0 commit comments