Skip to content

Commit b6ea850

Browse files
shenxianpengclaude
andauthored
docs: consolidate the site from 17 pages to 10 (#4)
Follow-up to #2, which merged the sample-output fix and the missing changelog entries. This is the structural pass. ## Why The site had roughly pre-commit.com's content volume (2.9k lines vs 2.3k) spread across **17 navigation destinations instead of 1**. Nine of those pages were under 100 lines. pre-commit.com reads as clear not because it categorises well, but because there is nothing to categorise — one page, one Ctrl-F, one URL. Four places said the same thing twice: - install steps in `installation.md` **and** quickstart step 1 - CLI invocations in `quickstart.md` **and** `example.md` - releases in `what-is-new.md` **and** `changelog.md` — #2 had to touch both, which is how an entry went missing - "what it checks" on the landing page restating the rules reference ## What changed | New page | Absorbed | |---|---| | `/getting-started/` | `installation` + `quickstart` | | `/guides/integrations/` | `pre-commit` + `github-actions` + `organization` | | `/guides/policies/` | `signoff` + `ai-attribution` | | `/` | `why` + `projects` (incl. the architecture diagram) | | `/changelog/` | `what-is-new` → a Highlights table | The Highlights table links into the entries below rather than restating them, so a release is written up once. All 18 version headings gained stable anchors (`/changelog/#v2130`). ## URLs **`/rules/` and `/configuration/` do not move.** Every released version of the package prints `commit-check.com/rules/#ccNNN` — hardcoded as `RULES_DOCS_URL` in `commit_check/rules_catalog.py` and asserted in its tests — so that path is a published interface, not a documentation path. Every retired URL gets a redirect stub emitted by `scripts/mkdocs_hooks.py`. Production is GitHub Pages, where `netlify.toml` has no effect, so the build hook is the only mechanism that reaches users; `netlify.toml` covers deploy previews only. The forced `/getting-started/` → `/getting-started/quickstart/` redirect is removed — it would have shadowed the real page that now lives there. ## Correctness fixes the merge surfaced - **`commit-check-action@v1`** in the GitHub Actions guide. The action has been on v2 since v2.0.0 (latest v2.12.0). The `v1` floating tag still resolves, so nothing errored — users just silently got an old action. The landing page already said `@v2`; the two disagreed. - **`author_name` / `author_email`** in the changelog from #2. The runtime options are `author_name_pattern` / `author_email_pattern`. - **Five `rev:` pins spread across four versions** (v2.5.0, v2.11.0, v2.12.2 ×2) → v2.13.0. The blog post keeps its own pin; a dated post records what was true when written. - **`v2.11.1` was missing entirely** from the changelog, and its two signoff fixes (#462, #464) were filed under v2.12.0 where they did not ship. - Hardcoded version badges dropped from the ecosystem cards — they went stale on their own. ## Guards added `mkdocs.yml` turns on `validation.anchors` and `unrecognized_links`, so the deploy build's `--strict` now fails on a broken anchor. The pages cross-link by section anchor after this change, and a stale anchor is invisible in a rendered page — it just scrolls to the top. Verified by breaking one: `Aborted with 1 warnings in strict mode`. The docs-sync CI job now installs the **released** package rather than `main`. That exception existed because the rule IDs were merged but unreleased; while it stood, CI was validating the site against code no reader could install. v2.13.0 is on PyPI, so it is over. Left unpinned deliberately — the check only means something against what `pip install commit-check` actually returns. ## Verification - 7/7 docs-sync tests pass **against the released 2.13.0 from PyPI**, not the working tree - `mkdocs build --strict` clean - A script walked every internal link and anchor in the built site: all resolve, `/rules/#cc003` intact - Redirect stubs confirmed for all 10 retired URLs --- _Generated by [Claude Code](https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn)_ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Restructured guides consolidating integrations and policies into streamlined references * Enhanced getting-started guide with pip, uv, and pipx installation support plus SLSA provenance verification * Improved changelog with highlights table and per-version anchors for better discoverability * Refreshed homepage and configuration examples to v2.13.0 <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7ddc2b7 commit b6ea850

20 files changed

Lines changed: 759 additions & 882 deletions

‎.github/workflows/deploy.yml‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@ jobs:
2525
with:
2626
python-version: '3.x'
2727

28-
# Installed from main rather than PyPI: the site documents rule IDs that
29-
# are merged but not yet released, so the published package would report
30-
# a spurious mismatch. Switch this to the released package once a version
31-
# carrying them is on PyPI.
32-
- name: Install commit-check from main
28+
# The released package, deliberately unpinned. This site documents the
29+
# version a reader can actually install, so the check is only meaningful
30+
# against that — pinning would let the two drift apart silently until
31+
# somebody bumped the pin.
32+
#
33+
# This used to install from main, because the rule IDs the site documents
34+
# were merged but unreleased and PyPI would have reported a spurious
35+
# mismatch. v2.13.0 shipped them, so the exception is over. If a future
36+
# release is documented here ahead of time, point this back at main for
37+
# as long as that is true, and no longer.
38+
- name: Install the released commit-check
3339
run: |
3440
python -m pip install --upgrade pip
35-
python -m pip install pytest
36-
python -m pip install "commit-check @ git+https://github.com/commit-check/commit-check@main"
41+
python -m pip install pytest commit-check
3742
3843
- name: Check the docs against the package
3944
run: pytest tests/ -q

‎docs/changelog.md‎

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,25 @@ All **notable changes** to this project will be documented in this file.
44

55
Full changelog available at [GitHub releases](https://github.com/commit-check/commit-check/releases).
66

7-
## v2.13.0 (2026-08-04)
7+
## Highlights
8+
9+
The releases worth knowing about, newest first. Each links to its full entry
10+
below and to the page that documents the feature properly.
11+
12+
| Version | What changed | Documented in |
13+
|---|---|---|
14+
| [2.13.0](#v2130) | Stable rule IDs in terminal output and JSON | [Rules reference](rules.md) |
15+
| [2.12.0](#v2120) | Author name and email patterns became configurable | [CC101](rules.md#cc101) · [CC102](rules.md#cc102) |
16+
| [2.11.0](#v2110) | AI attribution policy | [Policy guides](guides/policies.md#ai-attribution) |
17+
| [2.10.0](#v2100) | `dependabot/` and `renovate/` branches accepted by default | [CC201](rules.md#cc201) |
18+
| [2.9.0](#v290) | AI agent branch prefixes accepted by default | [CC201](rules.md#cc201) |
19+
| [2.8.0](#v280) | Custom `message_pattern`; Python 3.9 dropped | [CC001](rules.md#cc001) |
20+
| [2.7.0](#v270) | Force push blocking | [CC301](rules.md#cc301) |
21+
| [2.6.0](#v260) | `--format json`, `--compact`, `--no-banner` | [Command-line recipes](example.md#output-for-scripts-and-ci) |
22+
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Integrations](guides/integrations.md#across-an-organization) |
23+
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |
24+
25+
## v2.13.0 (2026-08-04) { #v2130 }
826

927
### New Features
1028

@@ -35,11 +53,12 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
3553
* The documentation, the landing page and the blog moved to
3654
[commit-check.com](https://commit-check.com) and are published from one
3755
domain. `docs.commit-check.com` URLs redirect.
38-
See PRs [#515](https://github.com/commit-check/commit-check/pull/515),
56+
See PRs [#514](https://github.com/commit-check/commit-check/pull/514),
57+
[#515](https://github.com/commit-check/commit-check/pull/515),
3958
[#518](https://github.com/commit-check/commit-check/pull/518) and
4059
[#519](https://github.com/commit-check/commit-check/pull/519).
4160

42-
## v2.12.2 (2026-08-01)
61+
## v2.12.2 (2026-08-01) { #v2122 }
4362

4463
### Bug Fixes
4564

@@ -53,7 +72,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
5372
rejected by `subject_imperative`.
5473
See PR [#496](https://github.com/commit-check/commit-check/pull/496).
5574

56-
## v2.12.1 (2026-07-31)
75+
## v2.12.1 (2026-07-31) { #v2121 }
5776

5877
### Bug Fixes
5978

@@ -63,13 +82,13 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
6382
* Hardened the `pip install` step flagged by SonarCloud code scanning.
6483
See PR [#479](https://github.com/commit-check/commit-check/pull/479).
6584

66-
## v2.12.0 (2026-07-24)
85+
## v2.12.0 (2026-07-24) { #v2120 }
6786

6887
### New Features
6988

70-
* **Configurable author patterns** — `author_name` and `author_email` accept a
71-
custom regex, so organisations can require their own naming or email domain
72-
instead of the built-in patterns.
89+
* **Configurable author patterns** — `author_name_pattern` and
90+
`author_email_pattern` accept a custom regex, so organisations can require
91+
their own naming or email domain instead of the built-in patterns.
7392
See PR [#459](https://github.com/commit-check/commit-check/pull/459).
7493

7594
### Bug Fixes
@@ -82,12 +101,17 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
82101
to the last commit's author. A misconfigured identity used to pass whenever
83102
the previous commit happened to be valid.
84103
See PR [#461](https://github.com/commit-check/commit-check/pull/461).
104+
105+
## v2.11.1 (2026-07-09) { #v2111 }
106+
107+
### Bug Fixes
108+
85109
* `require_signed_off_by` accepts any name, and is skipped for authors listed
86110
in `ignore_authors`.
87111
See PRs [#462](https://github.com/commit-check/commit-check/pull/462) and
88112
[#464](https://github.com/commit-check/commit-check/pull/464).
89113

90-
## v2.11.0 (2026-07-06)
114+
## v2.11.0 (2026-07-06) { #v2110 }
91115

92116
### New Features
93117

@@ -108,7 +132,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
108132
* Migrated PyPI publishing to `pypa/gh-action-pypi-publish`
109133
* Removed OpenSSF Scorecard badge after evaluation (moved to Scorecard dashboard)
110134

111-
## v2.10.1 (2026-06-30)
135+
## v2.10.1 (2026-06-30) { #v2101 }
112136

113137
### Bug Fixes
114138

@@ -126,7 +150,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
126150
* Removed legacy YAML config parsing code from `util.py`.
127151
See PR [#444](https://github.com/commit-check/commit-check/pull/444).
128152

129-
## v2.10.0 (2026-06-26)
153+
## v2.10.0 (2026-06-26) { #v2100 }
130154

131155
### New Features
132156

@@ -135,7 +159,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
135159
so dependency update branches are automatically recognized.
136160
See PR [#442](https://github.com/commit-check/commit-check/pull/442).
137161

138-
## v2.9.0 (2026-06-22)
162+
## v2.9.0 (2026-06-22) { #v290 }
139163

140164
### New Features
141165

@@ -144,7 +168,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
144168
`DEFAULT_BRANCH_TYPES` so branches created by AI coding agents are
145169
recognized as valid. See PR [#438](https://github.com/commit-check/commit-check/pull/438).
146170

147-
## v2.8.1 (2026-06-22)
171+
## v2.8.1 (2026-06-22) { #v281 }
148172

149173
### Chores
150174

@@ -154,7 +178,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
154178
* Added SchemaStore IDE autocompletion support for `cchk.toml`.
155179
See PR [#433](https://github.com/commit-check/commit-check/pull/433).
156180

157-
## v2.8.0 (2026-06-13)
181+
## v2.8.0 (2026-06-13) { #v280 }
158182

159183
### New Features
160184

@@ -170,15 +194,15 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
170194
`py.typed` marker added for downstream type checkers.
171195
See PR [#424](https://github.com/commit-check/commit-check/pull/424).
172196

173-
## v2.7.1 (2026-06-08)
197+
## v2.7.1 (2026-06-08) { #v271 }
174198

175199
### Chores
176200

177201
* Added `auto` to the list of imperative verbs. See PR [#417](https://github.com/commit-check/commit-check/pull/417).
178202
* Added commit-check vs GitHub Rulesets comparison table to the README.
179203
See PR [#419](https://github.com/commit-check/commit-check/pull/419).
180204

181-
## v2.7.0 (2026-05-16)
205+
## v2.7.0 (2026-05-16) { #v270 }
182206

183207
### New Features
184208

@@ -203,7 +227,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
203227
engineering, general), growing the total from 234 to 390.
204228
See PR [#414](https://github.com/commit-check/commit-check/pull/414).
205229

206-
## v2.6.0 (2026-04-20)
230+
## v2.6.0 (2026-04-20) { #v260 }
207231

208232
### New Features
209233

@@ -214,7 +238,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
214238

215239
* Fixed `print_error_header` state handling so repeated validations stay consistent when `--compact` is used.
216240

217-
## v2.5.0 (2026-04-03)
241+
## v2.5.0 (2026-04-03) { #v250 }
218242

219243
### New Features
220244

@@ -226,7 +250,7 @@ Full changelog available at [GitHub releases](https://github.com/commit-check/co
226250

227251
* Fixed incorrect mock target in `test_main_with_message_empty_string_no_stdin_with_git`: was patching `commit_check.util.get_commit_info` (ineffective) instead of `commit_check.engine.get_commit_info`.
228252

229-
## v2.0.0 (2025-10-01)
253+
## v2.0.0 (2025-10-01) { #v200 }
230254

231255
!!! warning
232256

@@ -262,10 +286,10 @@ Architecture Redesign:
262286

263287
See PR [#280](https://github.com/commit-check/commit-check/pull/280)
264288

265-
## v0.10.2 (2025-08-26)
289+
## v0.10.2 (2025-08-26) { #v0102 }
266290

267291
Last release before the big v2.0 changes.
268292

269-
## v0.1.0 (2022-11-02)
293+
## v0.1.0 (2022-11-02) { #v010 }
270294

271295
Initial release of commit-check.

‎docs/configuration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ The primary use case for CLI arguments is configuring commit-check in `.pre-comm
188188
```yaml
189189
repos:
190190
- repo: https://github.com/commit-check/commit-check
191-
rev: v2.5.0
191+
rev: v2.13.0
192192
hooks:
193193
- id: check-message
194194
args:

‎docs/example.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Command-line recipes
22

3-
Ways to invoke the checks directly. For wiring them into a workflow, see the
4-
[pre-commit](guides/pre-commit.md) and [GitHub Actions](guides/github-actions.md)
5-
guides instead — those cover the setup this page assumes you already have.
3+
Ways to invoke the checks directly. For wiring them into a workflow, see
4+
[Integrations](guides/integrations.md) instead — that covers the setup this page
5+
assumes you already have.
66

77
Every option, and the environment variable and TOML key that set it, is listed
88
in [Configuration](configuration.md).
@@ -104,7 +104,7 @@ pushed:
104104
```yaml title=".pre-commit-config.yaml"
105105
repos:
106106
- repo: https://github.com/commit-check/commit-check
107-
rev: v2.11.0
107+
rev: v2.13.0
108108
hooks:
109109
- id: check-no-force-push
110110
stages: [pre-push]
Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,47 @@
1-
# Quick start
1+
# Getting started
22

3-
By the end of this page you will have Commit Check rejecting a bad commit
4-
message on your machine, and you will understand what it is telling you.
3+
By the end of this page you will have Commit Check installed, rejecting a bad
4+
commit message on your machine, and wired into the two places it belongs.
55

66
It takes about five minutes and needs nothing but a Git repository.
77

88
## 1. Install
99

10+
=== "pip"
11+
12+
```console
13+
$ pip install commit-check
14+
```
15+
16+
=== "uv"
17+
18+
```console
19+
$ uv tool install commit-check
20+
```
21+
22+
=== "pipx"
23+
24+
```console
25+
$ pipx install commit-check
26+
```
27+
28+
Verify the install:
29+
1030
```console
11-
$ pip install commit-check
31+
$ commit-check --version
1232
```
1333

34+
The CLI is also available as `cchk`, which is the same program under a shorter
35+
name.
36+
37+
!!! tip "Supported Python versions"
38+
39+
Commit Check supports Python 3.10 through 3.14, on Linux, macOS and Windows.
40+
41+
Running it as a [pre-commit hook](guides/integrations.md#as-a-pre-commit-hook)
42+
or a [GitHub Action](guides/integrations.md#in-github-actions) needs no
43+
installation step at all — both fetch it for you.
44+
1445
## 2. Watch it reject something
1546

1647
Commit Check works with no configuration at all. Make a deliberately bad commit
@@ -77,8 +108,8 @@ $ commit-check --branch
77108

78109
`commit-check --message` never evaluates branch rules, and vice versa. Each
79110
check is selected by its own flag, so you can run exactly what a given hook
80-
or CI job needs. The
81-
[rules reference](../rules.md) lists which flag activates each rule.
111+
or CI job needs. The [rules reference](rules.md) lists which flag activates
112+
each rule.
82113

83114
## 5. Write down your policy
84115

@@ -109,8 +140,8 @@ $ commit-check --message
109140

110141
Even with no config file, Conventional Commits, Conventional Branch, subject
111142
length limits of 5–80 characters, and author name/email patterns are
112-
enforced. Check the *Default* column in the
113-
[rules reference](../rules.md) before assuming a rule is off.
143+
enforced. Check the *Default* column in the [rules reference](rules.md)
144+
before assuming a rule is off.
114145

115146
## 6. Make it automatic
116147

@@ -126,7 +157,7 @@ belongs:
126157
A pre-commit hook rejects the message as you write it, so nothing bad
127158
reaches the branch in the first place.
128159

129-
[:octicons-arrow-right-24: Pre-commit guide](../guides/pre-commit.md)
160+
[:octicons-arrow-right-24: Pre-commit hook](guides/integrations.md#as-a-pre-commit-hook)
130161

131162
- :material-github:{ .lg .middle } __On every pull request__
132163

@@ -135,14 +166,24 @@ belongs:
135166
A GitHub Action checks every commit in the PR and can comment on the PR
136167
with what needs fixing.
137168

138-
[:octicons-arrow-right-24: GitHub Actions guide](../guides/github-actions.md)
169+
[:octicons-arrow-right-24: GitHub Actions](guides/integrations.md#in-github-actions)
139170

140171
</div>
141172

173+
## Verifying the download
174+
175+
Releases are built with [SLSA Level 3](https://slsa.dev) provenance. To verify a
176+
release artifact came from this repository's build pipeline:
177+
178+
```console
179+
$ gh attestation verify commit_check-*.whl --repo commit-check/commit-check
180+
```
181+
142182
## Where to go next
143183

144-
- **[Rules reference](../rules.md)** — every rule, what it does, why it matters,
184+
- **[Rules reference](rules.md)** — every rule, what it does, why it matters,
145185
and how to configure it.
146-
- **[Configuration](../configuration.md)** — every option, its type and default,
186+
- **[Configuration](configuration.md)** — every option, its type and default,
147187
plus the environment variable and CLI flag that override it.
148-
- **[Why Commit Check](why.md)** — the reasoning behind the tool.
188+
- **[Command-line recipes](example.md)** — checking a range, wiring up CI,
189+
reading the JSON output.

0 commit comments

Comments
 (0)