Skip to content

Commit 8917055

Browse files
Add entry for indentation to style guide (github#16728)
* Add entry for indentation * Update contributing/content-style-guide.md Co-authored-by: Laura Coursen <lecoursen@github.com> Co-authored-by: Laura Coursen <lecoursen@github.com>
1 parent 4a66fdf commit 8917055

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

contributing/content-style-guide.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ These guidelines are specific to GitHub’s documentation. For general style que
1212
- [Code blocks](#code-blocks)
1313
- [Commands](#commands)
1414
- [Examples](#examples)
15+
- [Indentation](#indentation)
1516
- [Headers](#headers)
1617
- [Images](#images)
1718
- [Alt text](#alt-text)
@@ -129,6 +130,21 @@ schedule:
129130
- cron: "40 19 * * *"
130131
```
131132

133+
### Indentation
134+
135+
In YAML examples, such as actions and workflow files, use two spaces to indent lines within nested lists and block sequences.
136+
137+
- **Use:**
138+
139+
```yaml
140+
steps:
141+
- uses: actions/checkout@v2
142+
- name: Setup Python
143+
uses: actions/setup-python@v2
144+
with:
145+
python-version: ${{ matrix.python }}
146+
```
147+
132148
## Headers
133149
134150
Use H3 for headers, and H4 for subheaders. When referring to headers, surround the header name with quotation marks.

0 commit comments

Comments
 (0)