Skip to content

Commit 111f591

Browse files
committed
docs(config.md): fix format issue, add period and add title to example config code blocks
1 parent 6b4f8b0 commit 111f591

File tree

1 file changed

+78
-103
lines changed

1 file changed

+78
-103
lines changed

docs/config.md

Lines changed: 78 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -4,244 +4,219 @@
44

55
### `name`
66

7-
Type: `str`
7+
- Type: `str`
8+
- Default: `"cz_conventional_commits"`
89

9-
Default: `"cz_conventional_commits"`
10-
11-
Name of the committing rules to use
10+
Name of the committing rules to use.
1211

1312
### `version`
1413

15-
Type: `str`
16-
17-
Default: `None`
14+
- Type: `str`
15+
- Default: `None`
1816

19-
Current version. Example: "0.1.2". Required if you use `version_provider = "commitizen"`.
17+
Current version. Example: `"0.1.2"`. Required if you use `version_provider = "commitizen"`.
2018

2119
### `version_files`
2220

23-
Type: `list`
21+
- Type: `list`
22+
- Default: `[]`
2423

25-
Default: `[ ]`
26-
27-
Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [Read more][version_files]
24+
Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:`. [Read more][version_files]
2825

2926
### `version_provider`
3027

31-
Type: `str`
32-
33-
Default: `commitizen`
28+
- Type: `str`
29+
- Default: `commitizen`
3430

35-
Version provider used to read and write version [Read more](#version-providers)
31+
Version provider used to read and write version. [Read more](#version-providers)
3632

3733
### `version_scheme`
3834

39-
Type: `str`
40-
41-
Default: `pep440`
35+
- Type: `str`
36+
- Default: `pep440`
4237

4338
Select a version scheme from the following options [`pep440`, `semver`, `semver2`].
4439
Useful for non-python projects. [Read more][version-scheme]
4540

4641
### `tag_format`
4742

48-
Type: `str`
49-
50-
Default: `$version`
43+
- Type: `str`
44+
- Default: `$version`
5145

5246
Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [Read more][tag_format]
5347

5448
### `legacy_tag_formats`
5549

56-
Type: `list`
57-
58-
Default: `[ ]`
50+
- Type: `list`
51+
- Default: `[]`
5952

6053
Legacy git tag formats, useful for old projects that changed tag format.
6154
Tags matching those formats will be recognized as version tags and be included in the changelog.
6255
Each entry uses the syntax as [`tag_format`](#tag_format). [Read more][tag_format]
6356

6457
### `ignored_tag_formats`
6558

66-
Type: `list`
67-
68-
Default: `[ ]`
59+
- Type: `list`
60+
- Default: `[]`
6961

7062
Tags matching those formats will be totally ignored and won't raise a warning.
7163
Each entry uses the syntax as [`tag_format`](#tag_format) with the addition of `*`
7264
that will match everything (non-greedy). [Read more][tag_format]
7365

7466
### `update_changelog_on_bump`
7567

76-
Type: `bool`
68+
- Type: `bool`
69+
- Default: `false`
7770

78-
Default: `false`
79-
80-
Create changelog when running `cz bump`
71+
Create changelog when running `cz bump`.
8172

8273
### `gpg_sign`
8374

84-
Type: `bool`
85-
86-
Default: `false`
75+
- Type: `bool`
76+
- Default: `false`
8777

8878
Use gpg signed tags instead of lightweight tags.
8979

9080
### `annotated_tag`
9181

92-
Type: `bool`
93-
94-
Default: `false`
82+
- Type: `bool`
83+
- Default: `false`
9584

9685
Use annotated tags instead of lightweight tags. [See difference][annotated-tags-vs-lightweight]
9786

9887
### `bump_message`
9988

100-
Type: `str`
101-
102-
Default: `None`
89+
- Type: `str`
90+
- Default: `None`
10391

104-
Create custom commit message, useful to skip CI. [Read more][bump_message]
92+
Create custom commit message. Useful to skip CI. [Read more][bump_message]
10593

10694
### `retry_after_failure`
10795

108-
Type: `bool`
109-
110-
Default: `false`
96+
- Type: `bool`
97+
- Default: `false`
11198

11299
Automatically retry failed commit when running `cz commit`. [Read more][retry_after_failure]
113100

114101
### `allow_abort`
115102

116-
Type: `bool`
117-
118-
Default: `false`
103+
- Type: `bool`
104+
- Default: `false`
119105

120-
Disallow empty commit messages, useful in CI. [Read more][allow_abort]
106+
Disallow empty commit messages. Useful in CI. [Read more][allow_abort]
121107

122108
### `allowed_prefixes`
123109

124-
Type: `list`
125-
Default: `[ "Merge", "Revert", "Pull request", "fixup!", "squash!"]`
126-
Allow some prefixes and do not try to match the regex when checking the message [Read more][allowed_prefixes]
110+
- Type: `list`
111+
- Default: `["Merge", "Revert", "Pull request", "fixup!", "squash!"]`
127112

128-
### `changelog_file`
113+
Allow some prefixes and do not try to match the regex when checking the message. [Read more][allowed_prefixes]
129114

130-
Type: `str`
115+
### `changelog_file`
131116

132-
Default: `CHANGELOG.md`
117+
- Type: `str`
118+
- Default: `CHANGELOG.md`
133119

134120
Filename of exported changelog
135121

136122
### `changelog_format`
137123

138-
Type: `str`
124+
- Type: `str`
125+
- Default: `None`
139126

140-
Default: None
141-
142-
Format used to parse and generate the changelog, If not specified, guessed from [`changelog_file`](#changelog_file).
127+
Format used to parse and generate the changelog. If not specified, guessed from [`changelog_file`](#changelog_file).
143128

144129
### `changelog_incremental`
145130

146-
Type: `bool`
131+
- Type: `bool`
132+
- Default: `false`
147133

148-
Default: `false`
134+
Update changelog with the missing versions. This is good if you don't want to replace previous versions in the file.
149135

150-
Update changelog with the missing versions. This is good if you don't want to replace previous versions in the file. Note: when doing `cz bump --changelog` this is automatically set to `true`
136+
!!! note
137+
When doing `cz bump --changelog` this is automatically set to `true`
151138

152139
### `changelog_start_rev`
153140

154-
Type: `str`
155-
156-
Default: `None`
141+
- Type: `str`
142+
- Default: `None`
157143

158144
Start from a given git rev to generate the changelog
159145

160146
### `changelog_merge_prerelease`
161147

162-
Type: `bool`
163-
164-
Default: `false`
148+
- Type: `bool`
149+
- Default: `false`
165150

166151
Collect all changes of prerelease versions into the next non-prerelease version when creating the changelog.
167152

168153
### `style`
169154

170-
Type: `list`
171-
172-
see above
155+
- Type: `list`
156+
- Default: `[]`
173157

174158
Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)][additional-features]
175159

176160
### `customize`
177161

178-
Type: `dict`
179-
180-
Default: `None`
162+
- Type: `dict`
163+
- Default: `None`
181164

182165
**This is only supported when config through `toml`.** Custom rules for committing and bumping. [Read more][customization]
183166

184167
### `use_shortcuts`
185168

186-
Type: `bool`
187-
188-
Default: `false`
169+
- Type: `bool`
170+
- Default: `false`
189171

190172
If enabled, Commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [Read more][shortcuts]
191173

192174
### `major_version_zero`
193175

194-
Type: `bool`
195-
196-
Default: `false`
176+
- Type: `bool`
177+
- Default: `false`
197178

198-
When true, breaking changes on a `0.x` will remain as a `0.x` version. On `false`, a breaking change will bump a `0.x` version to `1.0`. [Read more][major-version-zero]
179+
If enabled, breaking changes on a `0.x` will remain as a `0.x` version. Otherwise, a breaking change will bump a `0.x` version to `1.0`. [Read more][major-version-zero]
199180

200181
### `prerelease_offset`
201182

202-
Type: `int`
203-
204-
Default: `0`
183+
- Type: `int`
184+
- Default: `0`
205185

206186
In some circumstances, a prerelease cannot start with a 0, e.g. in an embedded project individual characters are encoded as bytes. This can be done by specifying an offset from which to start counting. [Read more][prerelease-offset]
207187

208188
### `pre_bump_hooks`
209189

210-
Type: `list[str]`
211-
212-
Default: `[]`
190+
- Type: `list[str]`
191+
- Default: `[]`
213192

214193
Calls the hook scripts **before** bumping version. [Read more][pre_bump_hooks]
215194

216195
### `post_bump_hooks`
217196

218-
Type: `list[str]`
219-
220-
Default: `[]`
197+
- Type: `list[str]`
198+
- Default: `[]`
221199

222200
Calls the hook scripts **after** bumping the version. [Read more][post_bump_hooks]
223201

224202
### `encoding`
225203

226-
Type: `str`
227-
228-
Default: `utf-8`
204+
- Type: `str`
205+
- Default: `utf-8`
229206

230207
Sets the character encoding to be used when parsing commit messages. [Read more][encoding]
231208

232209
### `template`
233210

234-
Type: `str`
235-
236-
Default: `None` (provided by plugin)
211+
- Type: `str`
212+
- Default: `None` (provided by plugin)
237213

238214
Provide custom changelog jinja template path relative to the current working directory. [Read more][template-customization]
239215

240216
### `extras`
241217

242-
Type: `dict[str, Any]`
243-
244-
Default: `{}`
218+
- Type: `dict[str, Any]`
219+
- Default: `{}`
245220

246221
Provide extra variables to the changelog template. [Read more][template-customization]
247222

@@ -255,7 +230,7 @@ You can also create a `.cz.toml` or `cz.toml` file at the root of your project f
255230

256231
Example configuration:
257232

258-
```toml
233+
```toml title=".cz.toml"
259234
[tool.commitizen]
260235
name = "cz_conventional_commits"
261236
version = "0.1.0"
@@ -282,7 +257,7 @@ style = [
282257

283258
Commitizen has support for JSON configuration. Recommended for `NodeJS` projects.
284259

285-
```json
260+
```json title=".cz.json"
286261
{
287262
"commitizen": {
288263
"name": "cz_conventional_commits",
@@ -308,7 +283,7 @@ Commitizen has support for JSON configuration. Recommended for `NodeJS` projects
308283

309284
YAML configuration is supported by Commitizen. Recommended for `Go`, `ansible`, or even `helm` charts projects.
310285

311-
```yaml
286+
```yaml title=".cz.yaml"
312287
commitizen:
313288
name: cz_conventional_commits
314289
version: 0.1.0
@@ -371,7 +346,7 @@ version_provider = "pep621"
371346

372347
You can add your own version provider by extending `VersionProvider` and exposing it on the `commitizen.provider` entrypoint.
373348

374-
Here is a quick example of a `my-provider` provider reading and writing version in a `VERSION` file.
349+
Here is a quick example of a provider reading and writing version in a `VERSION` file.
375350

376351
```python title="my_provider.py"
377352
from pathlib import Path

0 commit comments

Comments
 (0)