Skip to content

Commit 73e212c

Browse files
committed
Format docs
1 parent 5e0af0c commit 73e212c

File tree

1 file changed

+76
-54
lines changed

1 file changed

+76
-54
lines changed

README.md

Lines changed: 76 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ npm install --save-dev @release-it/conventional-changelog
88

99
## Configuration
1010

11-
In the [release-it](https://github.com/release-it/release-it) config, for example:
11+
In the [release-it][1] config, for example:
1212

1313
```json
1414
"plugins": {
@@ -21,27 +21,25 @@ In the [release-it](https://github.com/release-it/release-it) config, for exampl
2121
}
2222
```
2323

24-
The plugin is a wrapper around conventional-changelog packages
25-
[conventional-recommended-bump](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-recommended-bump#readme),
26-
[conventional-changelog-core](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#api)
27-
and more.
24+
The plugin is a wrapper around conventional-changelog packages [conventional-recommended-bump][2],
25+
[conventional-changelog-core][3] and more.
2826

2927
## Contents
3028

31-
- [`preset`](#preset)
29+
- [`preset`][4]
3230
- Bump
33-
- [`commitsOpts`](#commitsopts)
34-
- [`tagOpts`](#tagopts)
35-
- [`whatBump`](#whatbump)
36-
- [`ignoreRecommendedBump`](#ignorerecommendedbump)
37-
- [`strictSemVer`](#strictsemver)
31+
- [`commitsOpts`][5]
32+
- [`tagOpts`][6]
33+
- [`whatBump`][7]
34+
- [`ignoreRecommendedBump`][8]
35+
- [`strictSemVer`][9]
3836
- Changelog
39-
- [`infile`](#infile)
40-
- [`header`](#header)
41-
- [`context`](#context)
42-
- [`gitRawCommitsOpts`](#gitrawcommitsopts)
43-
- [`parserOpts`](#parseropts)
44-
- [`writerOpts`](#writeropts)
37+
- [`infile`][10]
38+
- [`header`][11]
39+
- [`context`][12]
40+
- [`gitRawCommitsOpts`][13]
41+
- [`parserOpts`][14]
42+
- [`writerOpts`][15]
4543

4644
### `preset`
4745

@@ -82,34 +80,27 @@ Use an object with `name` and `types` to use a custom preset:
8280
}
8381
```
8482

85-
This is passed as the first argument to
86-
[`bumper.loadPreset`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api)
87-
(in both bumper and changelog writer).
83+
This is passed as the first argument to [`bumper.loadPreset`][16] (in both bumper and changelog writer).
8884

89-
See the
90-
[Conventional Changelog Configuration Spec (v2.1.0)](https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.1.0/README.md)
91-
for the configuration object to pass as `preset`.
85+
See the [Conventional Changelog Configuration Spec (v2.1.0)][17] for the configuration object to pass as `preset`.
9286

9387
## Bump
9488

9589
### `tagOpts`
9690

97-
- This option will be passed as the first argument to
98-
[`bumper.tag`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api)
99-
- [Type definition for `tagOpts` → look for `GetSemverTagsParams`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/git-client/src/types.ts)
91+
- This option will be passed as the first argument to [`bumper.tag`][16]
92+
- [Type definition for `tagOpts` → look for `GetSemverTagsParams`][18]
10093

10194
### `commitsOpts`
10295

103-
- This option will be passed as the first argument to
104-
[`bumper.commits`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api)
105-
- [Type definition for `commitsOpts` → look for `GetCommitsParams`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/git-client/src/types.ts)
96+
- This option will be passed as the first argument to [`bumper.commits`][16]
97+
- [Type definition for `commitsOpts` → look for `GetCommitsParams`][18]
10698

10799
### `whatBump`
108100

109-
- This option will be passed as the first argument to
110-
[`bumper.bump`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api)
111-
- [Type definition for `whatBump` → look for `Preset['whatBump']`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/src/types.ts)
112-
- Use the `false` Boolean value to skip releasing a new version.
101+
- This option will be passed as the first argument to [`bumper.bump`][16]
102+
- [Type definition for `whatBump` → look for `Preset['whatBump']`][19]
103+
- Use `false` to skip releasing a new version:
113104

114105
```json
115106
{
@@ -149,8 +140,8 @@ Default value: `undefined`
149140

150141
- Set a filename as `infile` to write the changelog to. If this file does not exist yet, it's created with the full
151142
history.
152-
- When `infile` is not set, the changelog generated by this plugin will still be used as release notes for e.g.
153-
[GitHub Releases](https://github.com/release-it/release-it/blob/master/docs/github-releases.md).
143+
- When `infile` is not set, the changelog generated by this plugin will still be used as release notes for e.g. [GitHub
144+
Releases][20].
154145
- Set `infile: false` to disable the changelog writing (and only use the recommended bump for the next version).
155146

156147
### `header`
@@ -175,9 +166,7 @@ Set the main header for the changelog document:
175166

176167
Default value: `undefined`
177168

178-
This option will be passed as the second argument (`context`) to
179-
[conventional-changelog-core](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#context),
180-
for example:
169+
This option will be passed as the second argument (`context`) to [conventional-changelog-core][21], for example:
181170

182171
```json
183172
"plugins": {
@@ -193,9 +182,8 @@ for example:
193182

194183
Default value: `undefined`
195184

196-
Options for
197-
[`git-raw-commits`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits#api).
198-
For example, you can use the following option to include merge commits into changelog:
185+
Options for [`git-raw-commits`][22]. For example, you can use the following option to include merge commits into
186+
changelog:
199187

200188
```json
201189
{
@@ -212,11 +200,9 @@ For example, you can use the following option to include merge commits into chan
212200
### `parserOpts`
213201

214202
- Default value: `undefined`
215-
- Options for
216-
[`conventional-commits-parser`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#api)
217-
- This option will also be passed as the second argument to
218-
[`bumper.parserOptions`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api)
219-
- [Type definition for `parserOpts` → look for `ParserOptions`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/src/types.ts)
203+
- Options for [`conventional-commits-parser`][23]
204+
- This option will also be passed as the second argument to [`bumper.parserOptions`][16]
205+
- [Type definition for `parserOpts` → look for `ParserOptions`][24]
220206

221207
For example, you can use the following option to set the merge pattern during parsing the commit message:
222208

@@ -235,9 +221,8 @@ For example, you can use the following option to set the merge pattern during pa
235221
### `writerOpts`
236222

237223
- Default value: `undefined`
238-
- Options for
239-
[`conventional-changelog-writer`](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#api)
240-
- [Type definition for `writerOpts` → look for `Options`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-writer/src/types/options.ts)
224+
- Options for [`conventional-changelog-writer`][25]
225+
- [Type definition for `writerOpts` → look for `Options`][26]
241226

242227
For example, you can use the following option to group the commits by 'scope' instead of 'type' by default.
243228

@@ -289,8 +274,45 @@ Depending on your shell or OS this may differ.
289274

290275
## GitHub Actions
291276

292-
When using this plugin in a GitHub Action, make sure to set
293-
[`fetch-depth: 0`](https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches) so the history is
294-
available to determine the correct recommended bump and changelog.
295-
296-
Also see https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions
277+
When using this plugin in a GitHub Action, make sure to set [`fetch-depth: 0`][27] so the history is available to
278+
determine the correct recommended bump and changelog.
279+
280+
Also see [https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions][28]
281+
282+
[1]: https://github.com/release-it/release-it
283+
[2]:
284+
https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-recommended-bump#readme
285+
[3]:
286+
https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#api
287+
[4]: #preset
288+
[5]: #commitsopts
289+
[6]: #tagopts
290+
[7]: #whatbump
291+
[8]: #ignorerecommendedbump
292+
[9]: #strictsemver
293+
[10]: #infile
294+
[11]: #header
295+
[12]: #context
296+
[13]: #gitrawcommitsopts
297+
[14]: #parseropts
298+
[15]: #writeropts
299+
[16]:
300+
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api
301+
[17]: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.1.0/README.md
302+
[18]: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/git-client/src/types.ts
303+
[19]:
304+
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/src/types.ts
305+
[20]: https://github.com/release-it/release-it/blob/master/docs/github-releases.md
306+
[21]:
307+
https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#context
308+
[22]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits#api
309+
[23]:
310+
https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#api
311+
[24]:
312+
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/src/types.ts
313+
[25]:
314+
https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#api
315+
[26]:
316+
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-writer/src/types/options.ts
317+
[27]: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
318+
[28]: https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions

0 commit comments

Comments
 (0)