Skip to content

Commit 357a062

Browse files
authored
Merge pull request #3416 from travis-ci/nrios14-patch-6
Update STYLE.md
2 parents d703858 + aee94b8 commit 357a062

File tree

1 file changed

+91
-42
lines changed

1 file changed

+91
-42
lines changed

STYLE.md

Lines changed: 91 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Travis CI documentation style guide
1+
# Travis CI Documentation Style Guide
22

3-
## Markdown and structure
3+
## Markdown and Structure
44

55
We're planning to lint the Markdown with [Coala.io][coala] and the [MarkdownBear][bear].
66

@@ -12,13 +12,13 @@ We'll be using a subset (TBD) of the full [list of checks][checks].
1212

1313
[checks]: https://github.com/coala/bear-docs/blob/master/docs/MarkdownBear.rst#settings "MarkdownBear checks"
1414

15-
We use Kramdown, with [GFM](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) codeblocks, and a few Kramdown related exceptions introduced with `{: }` such as class names for specific formatting of columns and notes.
15+
We use Kramdown, with [GFM](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) code blocks, and a few Kramdown-related exceptions introduced with `{: }` such as class names for specific formatting of columns and notes.
1616

17-
### Headings
17+
## Headings
1818

19-
For historical reasons, the top level heading in Jekyll markdown files is level 2 (##) not level 1 (#).
19+
For historical reasons, the top-level heading in Jekyll's markdown files is level 2 (##), not level 1 (#). Only the page’s title is a level 1 heading.
2020

21-
We use ATX style headings, and do not use the optional closing hashes:
21+
We use ATX-style headings and do not use the optional closing hashes:
2222

2323
```markdown
2424
## This is an H2
@@ -28,38 +28,62 @@ We use ATX style headings, and do not use the optional closing hashes:
2828
#### This is an H4
2929
```
3030

31-
We do not use underline style headings:
31+
We do not use underlined style headings:
3232

3333
```markdown
3434
Do not use this style heading
3535
=============================
3636
```
3737

38-
### Lists
38+
## Lists
3939

40-
If you have long lists you can wrap them into 2 (`.column-2`) or 3 (`.column-3`) columns using one of the follow CSS classes after your list item:
40+
If you have long lists, you can wrap them into 2 (`.column-2`) or 3 (`.column-3`) columns using one of the following CSS classes after your list item:
4141

4242
```css
4343
* long list item 1
4444
* long list item 2
4545
{: .column-2 }
4646
```
4747

48-
#### In-page table of contents
48+
## Links
4949

50-
All pages have tables of contents generated automatically from H2 and H3
50+
Make sure all links have titles:
51+
52+
```markdown
53+
The [link][example1] in the text
54+
55+
[example1]: http://www.example.com "Example URL"
56+
```
57+
58+
or
59+
60+
```markdown
61+
The [link](http://www.example.com "Example URL") in the text
62+
```
63+
64+
When linking internal pages, use absolute paths and trailing slashes: `/user/languages/c/`.
65+
You can link to headings and remember to remove special characters, for example:
66+
67+
To link to "##Node.js Page," use `#nodejs-page`.
68+
69+
70+
## In-page Options
5171

52-
To remove the TOC from a page add `no_toc: true` to the frontmatter.
72+
### Notes, warnings, and blocks
5373

54-
### Note, warnings and blocks
74+
Travis CI uses the blockquote symbol `>` for general-purpose notes and warnings.
5575

56-
We use the blockquote symbol `>` for general purpose notes and warnings.
76+
See an example below:
5777

58-
#### Beta features
78+
> Note: This feature is only available in Version 2.0.
79+
80+
### Beta features
5981

6082
Mark all beta features with a specially formatted note. Both the `> BETA` and
6183
the `{: .beta}` are required.
6284

85+
See an example below:
86+
6387
> BETA Awesome new feature that might not be enabled and is subject to change.
6488
{: .beta}
6589

@@ -68,46 +92,25 @@ the `{: .beta}` are required.
6892
Mark all alpha features with a specially formatted note. Both the `> ALPHA` and
6993
the `{: alpha}` are required.
7094

71-
> ALPHA Awesome new feature that might explode for extra fun.
95+
> ALPHA: Awesome new feature that might explode for extra fun.
7296
{: .alpha}
7397

7498
### GUI
7599

76-
Make sure all references to items in a GUI match the case of the UI, and are marked with *asterisks*.
77-
78-
### Links
79-
80-
Make sure all links have titles:
81-
82-
```markdown
83-
The [link][example1] in the text
84-
85-
[example1]: http://www.example.com "Example URL"
86-
```
87-
88-
or
89-
90-
```markdown
91-
The [link](http://www.example.com "Example URL") in the text
92-
```
93-
94-
When linking internal pages, use absolute paths and trailing slashes: `/user/languages/c/`.
95-
You can link to headings, remember to remove special characters, for example:
96-
97-
To link to "##Node.js Page" use `#nodejs-page`.
100+
Ensure all references to items in a GUI match the case of the UI and are marked with *asterisks*.
98101

99102

100103
### Code Inline
101104

102-
All function names, filenames, etc should be marked with `back-ticks`.
105+
All function names, filenames, etc., should be marked with `back-ticks`.
103106

104107
If you're talking about applications or services, only the actual command should be marked as code, not the name of the service:
105108

106109
- Start the PostgreSQL database by running `psql`.
107110

108111
### Blockquotes / Notes / Warnings
109112

110-
As we have no use for blockquotes we use `>` to indicate notes and warnings:
113+
As we have no use for blockquotes, we use `>` to indicate notes and warnings:
111114

112115
```markdown
113116
> Note this important info!
@@ -131,16 +134,62 @@ This code is in .travis.yml
131134
```
132135
{: data-file=".travis.yml"}
133136

137+
### In-page table of contents
138+
139+
All Travis CI pages have tables of contents generated automatically from H2 and H3
134140

141+
Add `no_toc: true` to the frontmatter to remove the TOC from a page.
135142

136-
### Common misspellings and words to avoid
143+
### Terminology
144+
The following are some common misspellings and words to avoid
137145

138146
- Always refer to *Travis CI* and never to Travis.
139147

140148
## Images
141149

150+
Add images inline-style with a brief description.
151+
152+
To add an image, follow these steps:
153+
1 Capture the image.
154+
2 Save the image in the `images/` path.
155+
3 Add the image to the documentation as follows:
156+
![description text](image path or URL)
157+
142158
### Screencapture gifs
143159

144160
1. Run a build (or whatever you are trying to capture),
145161
2. Capture it with [licecap](https://www.cockos.com/licecap/).
146-
3. Save the gif in `images/`
162+
3. Save the gif in the following path: `images/`
163+
164+
165+
## Documentation Template
166+
167+
A basic template for contributing to new documentation pages or sections is as follows:
168+
169+
```markdown
170+
---
171+
title: “Insert Page Title”
172+
layout: en
173+
174+
---
175+
176+
Start your introduction here. Usually, an introduction is between one and three sentences.
177+
178+
## Section Heading
179+
180+
Section introduction sentence.
181+
182+
* **Item1** - a group of *jobs* that run in sequence.
183+
* **Item2** - a group of *jobs* that run in parallel as part of a sequential *build* process composed of multiple [stages](/user/build-stages/).
184+
* **Item3** - an automated process that clones your repository into a virtual
185+
environment and then carries out a series of *phases* such as compiling your
186+
code, running tests, etc.
187+
* **Item4** - the [sequential steps](/user/job-lifecycle/)
188+
of a *job*.
189+
190+
```
191+
{: data-file=".travis.yml"}
192+
193+
The example above shows a paragraph with different formatting options.
194+
195+
Check out the [Travis CI documentation](https://docs.travis-ci.com/) for more examples.

0 commit comments

Comments
 (0)