Skip to content

Commit 1f6b70f

Browse files
committed
docs: fix missing links, reorganize documentation and replace command help messages with images
1 parent 3d705a2 commit 1f6b70f

13 files changed

+53
-120
lines changed

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ descriptive commits.
3232
### Features
3333

3434
- Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits]
35-
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./bump.md)
35+
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./commands/bump.md)
3636
- Generate a changelog using [Keep a changelog][keepchangelog]
3737
- Update your project's version files automatically
3838
- Display information about your commit rules (commands: schema, example, info)

docs/bump.md renamed to docs/commands/bump.md

+7-59
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Bump version](images/bump.gif)
1+
![Bump version](../images/bump.gif)
22

33
## About
44

@@ -50,60 +50,8 @@ Some examples of pep440:
5050

5151
## Usage
5252

53-
```bash
54-
$ cz bump --help
55-
usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] [--no-verify] [--yes] [--tag-format TAG_FORMAT]
56-
[--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}] [--devrelease DEVRELEASE] [--increment {MAJOR,MINOR,PATCH}]
57-
[--check-consistency] [--annotated-tag] [--gpg-sign] [--changelog-to-stdout] [--git-output-to-stderr] [--retry] [--major-version-zero]
58-
[--prerelease-offset PRERELEASE_OFFSET] [--version-scheme {pep440,semver,semver2}] [--version-type {pep440,semver,semver2}] [--build-metadata BUILD_METADATA]
59-
[MANUAL_VERSION]
60-
61-
positional arguments:
62-
MANUAL_VERSION bump to the given version (e.g: 1.5.3)
63-
64-
options:
65-
-h, --help show this help message and exit
66-
--dry-run show output to stdout, no commit, no modified files
67-
--files-only bump version in the files from the config
68-
--local-version bump only the local version portion
69-
--changelog, -ch generate the changelog for the newest version
70-
--no-verify this option bypasses the pre-commit and commit-msg hooks
71-
--yes accept automatically questions done
72-
--tag-format TAG_FORMAT
73-
the format used to tag the commit and read it, use it in existing projects, wrap around simple quotes
74-
--bump-message BUMP_MESSAGE
75-
template used to create the release commit, useful when working with CI
76-
--prerelease {alpha,beta,rc}, -pr {alpha,beta,rc}
77-
choose type of prerelease
78-
--devrelease DEVRELEASE, -d DEVRELEASE
79-
specify non-negative integer for dev. release
80-
--increment {MAJOR,MINOR,PATCH}
81-
manually specify the desired increment
82-
--increment-mode
83-
set the method by which the new version is chosen. 'linear' (default) guesses the next version based
84-
on typical linear version progression, such that bumping of a pre-release with lower precedence than
85-
the current pre-release phase maintains the current phase of higher precedence. 'exact' applies the
86-
changes that have been specified (or determined from the commit log) without interpretation, such that
87-
the increment and pre-release are always honored
88-
--check-consistency, -cc
89-
check consistency among versions defined in commitizen configuration and version_files
90-
--annotated-tag, -at create annotated tag instead of lightweight one
91-
--gpg-sign, -s sign tag instead of lightweight one
92-
--changelog-to-stdout
93-
Output changelog to the stdout
94-
--git-output-to-stderr
95-
Redirect git output to stderr
96-
--retry retry commit if it fails the 1st time
97-
--major-version-zero keep major version at zero, even for breaking changes
98-
--prerelease-offset PRERELEASE_OFFSET
99-
start pre-releases with this offset
100-
--version-scheme {pep440,semver,semver2}
101-
choose version scheme
102-
--version-type {pep440,semver,semver2}
103-
Deprecated, use --version-scheme
104-
--build-metadata {BUILD_METADATA}
105-
additional metadata in the version string
106-
```
53+
![cz bump --help](../images/cli_help/cz_bump___help.svg)
54+
10755

10856
### `--files-only`
10957

@@ -306,7 +254,7 @@ Yes, you shouldn't have any issues.
306254
### `--template`
307255

308256
Provides your own changelog jinja template.
309-
See [the template customization section](customization.md#customizing-the-changelog-template)
257+
See [the template customization section](../customization.md#customizing-the-changelog-template)
310258

311259
### `--extra`
312260

@@ -316,7 +264,7 @@ Provides your own changelog extra variables by using the `extras` settings or th
316264
cz bump --changelog --extra key=value -e short="quoted value"
317265
```
318266

319-
See [the template customization section](customization.md#customizing-the-changelog-template).
267+
See [the template customization section](../customization.md#customizing-the-changelog-template).
320268

321269
### `--build-metadata`
322270

@@ -388,7 +336,7 @@ cz --no-raise 3,4,5
388336

389337
### Longer way
390338

391-
Check the list of [exit_codes](./exit_codes.md) and understand which one you have
339+
Check the list of [exit_codes](../exit_codes.md) and understand which one you have
392340
to skip and why.
393341

394342
Remember to document somewhere this, because you'll forget.
@@ -637,7 +585,7 @@ version_scheme = "semver"
637585

638586
## Custom bump
639587

640-
Read the [customizing section](./customization.md).
588+
Read the [customizing section](../customization.md).
641589

642590
[pep440]: https://www.python.org/dev/peps/pep-0440/
643591
[semver]: https://semver.org/

docs/changelog.md renamed to docs/commands/changelog.md

+4-30
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,7 @@ update_changelog_on_bump = true
1111

1212
## Usage
1313

14-
```bash
15-
$ cz changelog --help
16-
usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] [--unreleased-version UNRELEASED_VERSION] [--incremental] [--start-rev START_REV]
17-
[--template TEMPLATE] [--extra EXTRA]
18-
[rev_range]
19-
20-
positional arguments:
21-
rev_range generates changelog for the given version (e.g: 1.5.3) or version range (e.g: 1.5.3..1.7.9)
22-
23-
optional arguments:
24-
-h, --help show this help message and exit
25-
--dry-run show changelog to stdout
26-
--file-name FILE_NAME
27-
file name of changelog (default: 'CHANGELOG.md')
28-
--unreleased-version UNRELEASED_VERSION
29-
set the value for the new version (use the tag value), instead of using unreleased
30-
--incremental generates changelog from last created version, useful if the changelog has been manually modified
31-
--start-rev START_REV
32-
start rev of the changelog. If not set, it will generate changelog from the start
33-
--merge-prerelease
34-
collect all changes from prereleases into next non-prerelease. If not set, it will include prereleases in the changelog
35-
start rev of the changelog.If not set, it will generate changelog from the start
36-
--template TEMPLATE, -t TEMPLATE
37-
changelog template file name (relative to the current working directory)
38-
--extra EXTRA, -e EXTRA
39-
a changelog extra variable (in the form 'key=value')
40-
```
14+
![cz changelog --help](../images/cli_help/cz_changelog___help.svg)
4115

4216
### Examples
4317

@@ -195,7 +169,7 @@ changelog_merge_prerelease = true
195169
### `template`
196170

197171
Provides your own changelog jinja template by using the `template` settings or the `--template` parameter.
198-
See [the template customization section](customization.md#customizing-the-changelog-template)
172+
See [the template customization section](../customization.md#customizing-the-changelog-template)
199173

200174
### `extras`
201175

@@ -205,7 +179,7 @@ Provides your own changelog extra variables by using the `extras` settings or th
205179
cz changelog --extra key=value -e short="quoted value"
206180
```
207181

208-
See [the template customization section](customization.md#customizing-the-changelog-template)
182+
See [the template customization section](../customization.md#customizing-the-changelog-template)
209183

210184
## Hooks
211185

@@ -218,4 +192,4 @@ Read more about hooks in the [customization page][customization]
218192

219193
[keepachangelog]: https://keepachangelog.com/
220194
[semver]: https://semver.org/
221-
[customization]: ./customization.md
195+
[customization]: ../customization.md

docs/check.md renamed to docs/commands/check.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
This feature checks whether the commit message follows the given committing rules. And comment in git message will be ignored.
66

77
If you want to setup an automatic check before every git commit, please refer to
8-
[Automatically check message before commit](./tutorials/auto_check.md).
8+
[Automatically check message before commit](../tutorials/auto_check.md).
99

1010
## Usage
1111

12+
![cz check --help](../images/cli_help/cz_check___help.svg)
13+
1214
There are three mutually exclusive ways to use `cz check`:
1315

1416
- with `--rev-range` to check a range of pre-existing commits
@@ -54,7 +56,7 @@ $ cz check --commit-msg-file COMMIT_MSG_FILE
5456
```
5557

5658
In this option, COMMIT_MSG_FILE is the path of the temporal file that contains the commit message.
57-
This argument can be useful when cooperating with git hook, please check [Automatically check message before commit](./tutorials/auto_check.md) for more information about how to use this argument with git hook.
59+
This argument can be useful when cooperating with git hook, please check [Automatically check message before commit](../tutorials/auto_check.md) for more information about how to use this argument with git hook.
5860

5961
### Allow Abort
6062

docs/commit.md renamed to docs/commands/commit.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Using commitizen cli](images/demo.gif)
1+
![Using commitizen cli](../images/demo.gif)
22

33
## About
44

@@ -7,13 +7,16 @@ In your terminal run `cz commit` or the shortcut `cz c` to generate a guided git
77
You can run `cz commit --write-message-to-file COMMIT_MSG_FILE` to additionally save the
88
generated message to a file. This can be combined with the `--dry-run` flag to only
99
write the message to a file and not modify files and create a commit. A possible use
10-
case for this is to [automatically prepare a commit message](./tutorials/auto_prepare_commit_message.md).
10+
case for this is to [automatically prepare a commit message](../tutorials/auto_prepare_commit_message.md).
1111

1212

1313
!!! note
1414
To maintain platform compatibility, the `commit` command disable ANSI escaping in its output.
1515
In particular pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417).
1616

17+
## Usage
18+
19+
![cz commit --help](../images/cli_help/cz_commit___help.svg)
1720

1821
### git options
1922

docs/init.md renamed to docs/commands/init.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
![Bump version](images/init.gif)
1+
## Usage
2+
3+
![cz init --help](../images/cli_help/cz_init___help.svg)
4+
5+
## Example
26

37
To start using commitizen, the recommended approach is to run
48

59
```sh
610
cz init
711
```
812

13+
![init](../images/init.gif)
14+
915
This command will ask you for information about the project and will
1016
configure the selected file type (`pyproject.toml`, `.cz.toml`, etc.).
1117

docs/config.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,17 @@ setup(
384384
)
385385
```
386386

387-
[version_files]: bump.md#version_files
388-
[tag_format]: bump.md#tag_format
389-
[bump_message]: bump.md#bump_message
390-
[major-version-zero]: bump.md#-major-version-zero
391-
[prerelease-offset]: bump.md#-prerelease_offset
392-
[retry_after_failure]: commit.md#retry
393-
[allow_abort]: check.md#allow-abort
394-
[version-scheme]: bump.md#version-scheme
395-
[pre_bump_hooks]: bump.md#pre_bump_hooks
396-
[post_bump_hooks]: bump.md#post_bump_hooks
397-
[allowed_prefixes]: check.md#allowed-prefixes
387+
[version_files]: commands/bump.md#version_files
388+
[tag_format]: commands/bump.md#tag_format
389+
[bump_message]: commands/bump.md#bump_message
390+
[major-version-zero]: commands/bump.md#-major-version-zero
391+
[prerelease-offset]: commands/bump.md#-prerelease_offset
392+
[retry_after_failure]: commands/commit.md#retry
393+
[allow_abort]: commands/check.md#allow-abort
394+
[version-scheme]: commands/bump.md#version-scheme
395+
[pre_bump_hooks]: commands/bump.md#pre_bump_hooks
396+
[post_bump_hooks]: commands/bump.md#post_bump_hooks
397+
[allowed_prefixes]: commands/check.md#allowed-prefixes
398398
[additional-features]: https://github.com/tmbo/questionary#additional-features
399399
[customization]: customization.md
400400
[shortcuts]: customization.md#shortcut-keys

docs/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ flowchart TD
105105
```
106106

107107

108-
[conventional-commmits]: https://www.conventionalcommits.org/
108+
[conventional-commits]: https://www.conventionalcommits.org/

docs/customization.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The basic steps are:
193193
3. Create a python package using `setup.py`, `poetry`, etc
194194
4. Expose the class as a `commitizen.plugin` entrypoint
195195

196-
Check an [example](convcomms) on how to configure `BaseCommitizen`.
196+
Check an [example][convcomms] on how to configure `BaseCommitizen`.
197197

198198
You can also automate the steps above through [cookiecutter](https://cookiecutter.readthedocs.io/en/1.7.0/).
199199

@@ -372,7 +372,7 @@ class StrangeCommitizen(BaseCommitizen):
372372
return full_changelog
373373
```
374374

375-
[changelog-des]: ./changelog.md#description
375+
[changelog-des]: ./commands/changelog.md#description
376376

377377
### Raise Customize Exception
378378

docs/getting_started.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ cz bump
2727
This command will bump your project's version, and it will create a tag.
2828

2929
Because of the setting `update_changelog_on_bump`, bump will also create the **changelog**.
30-
You can also [update files](./bump.md#version_files).
31-
You can configure the [version scheme](./bump.md#version_scheme) and [version provider](./config.md#version-providers).
30+
You can also [update files](./commands/bump.md#version_files).
31+
You can configure the [version scheme](./commands/bump.md#version_scheme) and [version provider](./config.md#version-providers).
3232

33-
There are many more options available, please read the docs for the [bump command](./bump.md).
33+
There are many more options available, please read the docs for the [bump command](./commands/bump.md).
3434

3535
### Committing
3636

@@ -116,4 +116,4 @@ Note that pre-commit discourages using `master` as a revision, and the above com
116116
pre-commit autoupdate
117117
```
118118

119-
Read more about the `check` command [here](check.md).
119+
Read more about the `check` command [here](commands/check.md).

docs/tutorials/auto_prepare_commit_message.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ squash) so that the complete git history adheres to the commit message conventio
77
without ever having to call `cz commit`.
88

99
To automatically prepare a commit message prior to committing, you can
10-
use a [prepare-commit-msg Git hook](prepare-commit-msg-docs):
10+
use a [prepare-commit-msg Git hook][prepare-commit-msg-docs]:
1111

1212
> This hook is invoked by git-commit right after preparing the
1313
> default log message, and before the editor is started.

docs/tutorials/gitlab_ci.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _Goal_: Bump a new version every time that a change occurs on the `master` branc
1010
2. A developer creates a merge request (MR) against `master` branch
1111
3. When the `MR` is merged into master, the 2 stages of the CI are executed
1212
4. For simplification, we store the software version in a file called `VERSION`. You can use any file that you want as `commitizen` supports it.
13-
5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](../bump.md) as well.
13+
5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](../commands/bump.md) as well.
1414

1515
### Gitlab Configuration
1616

mkdocs.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ nav:
3333
- Introduction: "README.md"
3434
- Getting Started: "getting_started.md"
3535
- Commands:
36-
- Init: "init.md"
37-
- Commit: "commit.md"
38-
- Bump: "bump.md"
39-
- Check: "check.md"
40-
- Changelog: "changelog.md"
36+
- Init: "commands/init.md"
37+
- Commit: "commands/commit.md"
38+
- Bump: "commands/bump.md"
39+
- Check: "commands/check.md"
40+
- Changelog: "commands/changelog.md"
4141
- Configuration: "config.md"
4242
- Customization: "customization.md"
4343
- Tutorials:

0 commit comments

Comments
 (0)