Skip to content

Commit ff2fdef

Browse files
author
lhirata
authored
Merge pull request cockroachdb#3199 from cockroachdb/capitalization
Updates for heading capitalization and other misc. edits
2 parents 11cd3c0 + 680477e commit ff2fdef

File tree

2 files changed

+38
-34
lines changed

2 files changed

+38
-34
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ summary: Short description of page for SEO
9191

9292
Field | Description | Default
9393
------|-------------|--------
94-
`title`| Used as the h1 header. | Nothing
94+
`title`| Used as the h1 header and written in title-case. | Nothing
9595
`summary` | Used as the page's `meta description` for SEO. Keep this under 155 characters. Consider using the first sentence of the page, or something similar. | Nothing
9696
9797
Optionally, you can specify other fields in the front-matter:

STYLE.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ The following guidance is provided to ensure consistency.
1212

1313
Included in this guide:
1414

15-
- [Language and Tone](#language-and-tone)
16-
- [Capitalization and Punctuation](#capitalization-and-punctuation)
17-
- [File Conventions](#file-conventions)
18-
- [Documentation Types](#documentation-types)
19-
- [Reference and Task-Based Docs](#reference-and-task-based-docs)
20-
- [Tutorials, Training, and Examples](#tutorials-training-and-examples)
21-
- [Concept Docs](#concept-docs)
15+
- [Language and tone](#language-and-tone)
16+
- [Capitalization and punctuation](#capitalization-and-punctuation)
17+
- [File conventions](#file-conventions)
18+
- [Documentation types](#documentation-types)
19+
- [Reference and task-based docs](#reference-and-task-based-docs)
20+
- [Tutorials, training, and examples](#tutorials-training-and-examples)
21+
- [Concept docs](#concept-docs)
2222
- [Components](#components)
2323
- [Headings](#headings)
24-
- [Text Format](#text-format)
24+
- [Text format](#text-format)
2525
- [Links](#links)
26-
- [Tips, Notes, and Warnings](#tips-notes-and-warnings)
26+
- [Tips, notes, and warnings](#tips-notes-and-warnings)
2727
- [Code](#code)
2828
- [Examples](#examples)
29-
- [Version Tags](#version-tags)
29+
- [Version tags](#version-tags)
3030
- [Tables](#tables)
3131
- [Lists](#lists)
3232
- [Images](#images)
3333

34-
## Language and Tone
34+
## Language and tone
3535

3636
CockroachDB docs should be helpful, humble, positive, and friendly. To achieve this, all docs should be factual and free from hyperbolic language.
3737

@@ -60,11 +60,11 @@ Other general guidance about language and tone:
6060

6161
**Example:** If you leave versioned binaries on your servers, you do not need to do anything.
6262

63-
## Capitalization and Punctuation
63+
## Capitalization and punctuation
6464

6565
Capitalization rules:
6666

67-
- Use title-case instead of sentence-case for all [headings](#headings).
67+
- Use sentence-case instead of title-case for all [headings](#headings).
6868
- Depending on the context, use title-case or sentence-case for [links](#links).
6969
- Capitalize proper nouns, CockroachDB specific terms, and the names of UI features:
7070

@@ -77,10 +77,11 @@ Punctuation rules:
7777
- Limit semicolon usage. Instead, try two simple sentences.
7878
- Don't use end punctuation (e.g., periods or colons) in headings.
7979
- Use periods at the end of list items if it is a sentence or completes a sentence.
80+
- Use the [Oxford (a.k.a. serial) comma](https://en.wikipedia.org/wiki/Serial_comma).
8081

8182
For more detail about how to format text, see [Componenets](#components).
8283

83-
## File Conventions
84+
## File conventions
8485

8586
CockroachDB docs are mainly comprised of pages (`.md`) and images (`.png` or `.gif`). File names are lowercase with a dash between words, and should be brief but descriptive.
8687

@@ -93,9 +94,9 @@ Each version's pages are found in a directory named for the version. For example
9394

9495
Each version's images are found in a directory named for the version under the `images` directory. For example, images for CockroachDB v1.0 are in the `docs > images > v1.0` directory. For more information, see [Images](#images).
9596

96-
## Documentation Types
97+
## Documentation types
9798

98-
### Reference and Task-Based Docs
99+
### Reference and task-based docs
99100

100101
Reference docs are informational and provide a comprehensive description of a CockroachDB function or feature, while task-based docs are instructional and provide prescriptive, step-by-step guidance to help a user complete a specific task.
101102

@@ -105,15 +106,17 @@ Examples:
105106
- **CLI reference doc example:** [Use the Built-in SQL Client](https://www.cockroachlabs.com/docs/stable/use-the-built-in-sql-client.html)
106107
- **Task-based doc example:** [Orchestrate CockroachDB with Kubernetes](https://www.cockroachlabs.com/docs/stable/orchestrate-cockroachdb-with-kubernetes.html)
107108

108-
### Tutorials, Training, and Examples
109+
### Tutorials, training, and examples
109110

110111
Tutorials, training, and examples are educational docs or sections meant to acquaint users with CockroachDB and its features. These docs should be written in a more conversational [tone](#language-and-tone), as if they are teaching the user.
111112

113+
Headings in tutorials and training docs should include `Step N.` to denote the sequence of steps to follow.
114+
112115
- **Tutorial example:** [JSON Support](https://www.cockroachlabs.com/docs/stable/demo-json-support)
113116
- **Training example:** [Cluster Startup and Scaling](https://www.cockroachlabs.com/docs/stable/training/cluster-startup-and-scaling.html)
114117
- **Example examples:** [Define Table Partitions](https://www.cockroachlabs.com/docs/stable/partitioning.html#examples), [Manage Roles](https://www.cockroachlabs.com/docs/stable/roles.html#example)
115118

116-
### Concept Docs
119+
### Concept docs
117120

118121
Concept docs are guides that detail how CockroachDB is built, but does not explain how you should architect an application using CockroachDB.
119122

@@ -128,16 +131,17 @@ Examples:
128131

129132
Use headings to demarcate content into a hierarchy to help readers find information easier.
130133

131-
Headings should be title-case, and are denoted by number signs (`#`) followed by one space. Enter a line break between a heading and its content. CockroachDB docs use Heading 2 (`##`), Heading 3 (`###`) and Heading 4 (`####`). We try to use Heading 4 sparingly.
134+
Headings should be sentence-case, and are denoted by number signs (`#`) followed by one space. Enter a line break between a heading and its content. CockroachDB docs use Heading 2 (`##`), Heading 3 (`###`) and Heading 4 (`####`). We try to use Heading 4 sparingly.
132135

133-
Heading 1 is reserved for page titles and anything under Heading 4 can be denoted by bolded text, or other layout options should be considered.
136+
Heading 1 is reserved for page titles and should be title-case. Anything under Heading 4 can be denoted by bolded text, or other layout options should be considered.
134137

135138
Examples:
136139

137-
- `## This is Heading 2`
138-
- `### And This is Heading 3`
140+
- `## This is heading 2`
141+
- `### And this is heading 3`
142+
- `## Step 2. This is a step in a tutorial`
139143

140-
### Text Format
144+
### Text format
141145

142146
#### Bold
143147

@@ -155,7 +159,7 @@ To bold a word or phrase, surround the text with two asterisks (`**`).
155159

156160
See [Inline Code](#inline-code).
157161

158-
#### Quotation Marks
162+
#### Quotation marks
159163

160164
Use quotation marks (`""`) to indicate a direct, word-for-word quotation.
161165

@@ -194,7 +198,7 @@ Links are marked with inline text surrounded by square brackets followed by the
194198

195199
**Example:** `[xyz](#heading-on-page)`
196200

197-
### Tips, Notes, and Warnings
201+
### Tips, notes, and warnings
198202

199203
Our docs use three classes of highlighted text:
200204

@@ -244,21 +248,21 @@ To insert a warning, use the following code:
244248

245249
Code can be shown [inline](#inline-code) or as a [code block](#code-blocks).
246250

247-
#### Inline Code
251+
#### Inline code
248252

249253
Inline `code` has `back-ticks (``) around` it and is used when referring to code, commands, or other technical syntax within a sentence.
250254

251255
Example: The `CREATE TABLE` statement creates a new table in a database.
252256

253-
#### Code Blocks
257+
#### Code blocks
254258

255259
Code blocks are used to provide executable code samples, marked with an opening and closing set of 3 tildes (`~~~`). Code blocks can support syntax highlighting if you add the language name immediately after the first line of back-ticks. Shell and SQL commands should be syntax highlighted where appropriate using the following info:
256260

257-
**Shell Code Samples**
261+
**Shell code samples**
258262

259263
Start shell code samples with `~~~ shell` followed by a line break. The first character of the next line must be the terminal marker `$`.
260264

261-
**SQL Code Samples**
265+
**SQL code samples**
262266

263267
SQL code samples are broken into two sections: commands and responses.
264268

@@ -267,7 +271,7 @@ SQL code samples are broken into two sections: commands and responses.
267271

268272
Note that not all responses warrant inclusion. For example, if a SQL code sample shows `CREATE TABLE`, `INSERT`, and then `SELECT`, it's unnecessary to show the responses for `CREATE TABLE` (which is just `CREATE TABLE`) and `INSERT` (which is just `INSERT <number of rows>`).
269273

270-
**Copy to Clipboard**
274+
**Copy to Clipboard Button**
271275

272276
Many of our code blocks are written so users can copy and paste them directly into a terminal. To make that easier, add the **Copy to Clipboard** button by placing `{% include copy-clipboard.html %}` on the line directly preceding the code block, for example:
273277

@@ -302,7 +306,7 @@ Examples help show the feature in action. Examples follow a basic format:
302306
303307
When such a "simple" table has no indexes or foreign keys, `INSERT`/`UPSERT`/`UPDATE`/`DELETE` statements translate to key-value operations with minimal overhead (single digit percent slowdowns)." [_Click here to see the rest of the example._](https://www.cockroachlabs.com/docs/stable/create-table.html#create-a-table-that-mirrors-key-value-storage)
304308
305-
### Version Tags
309+
### Version tags
306310
307311
Use HTML version tags to denote new or updated features for the version. Version tags can be put at the end of a heading, if the whole section describes something that is new or updated. Otherwise, version tags can introduce a paragraph, sentence, or description in a table cell.
308312
@@ -389,7 +393,7 @@ For each item of a **numbered list**, use the step number followed by a period a
389393
390394
For each item of a **bulleted list**, use one dash followed by one space to denote a list item, e.g., `- This is a bulleted list`.
391395
392-
#### Nesting Lists
396+
#### Nesting lists
393397
394398
To nest a list under a list item, start the list on the next line (no empty line), and indent the new list four spaces, for example:
395399
@@ -402,7 +406,7 @@ To nest a list under a list item, start the list on the next line (no empty line
402406
2. This is a step.
403407
```
404408
405-
#### Nesting Paragraphs or Code Blocks
409+
#### Nesting paragraphs or code blocks
406410
407411
To nest a paragraph or code block under a list item, insert an empty line and then indent the paragraph or code block 4 spaces, for example:
408412

0 commit comments

Comments
 (0)