Skip to content

docs: consolidate the site from 17 pages to 10 - #4

Merged
shenxianpeng merged 4 commits into
mainfrom
chore/refresh-sample-output
Aug 4, 2026
Merged

docs: consolidate the site from 17 pages to 10#4
shenxianpeng merged 4 commits into
mainfrom
chore/refresh-sample-output

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Aug 4, 2026

Copy link
Copy Markdown
Member

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.mdChore/refresh sample output #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 Chore/refresh sample output #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

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

claude added 4 commits August 4, 2026 11:54
The previous commit listed #462 and #464 under v2.12.0, but both shipped in
v2.11.1 — a release the changelog still had no section for at all. Moves the
bullet to a new v2.11.1 section, which also closes the last gap between
v2.11.0 and today.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
The site had pre-commit.com's content volume spread across nearly twice the
navigation destinations: nine pages under 100 lines, and four places where the
same material was written twice — install steps in both installation.md and
quickstart step 1, CLI invocations in both quickstart and example.md, releases
in both what-is-new.md and changelog.md, and "what it checks" on the landing
page restating the rules reference.

Merges installation and quickstart into one Getting started page; the three
deployment guides into Integrations; the two opt-in policy guides into Policy
guides; why.md and projects.md into the landing page. what-is-new.md becomes a
Highlights table at the top of the changelog that links into the entries below
rather than restating them, so a release is written up once.

rules.md and configuration.md do not move. Every released version of the
package prints commit-check.com/rules/#ccNNN, hardcoded in rules_catalog.py,
so that URL is a published interface rather than a documentation path. Every
retired URL gets a redirect stub from the build hook — production is GitHub
Pages, where netlify.toml has no effect — and the forced /getting-started/
redirect is gone now that a real page lives there.

Also fixes what the merge surfaced: the GitHub Actions guide pinned
commit-check-action@v1 when the action has been on v2 since v2.0.0, the
changelog named the author options author_name/author_email rather than
author_name_pattern/author_email_pattern, and the pre-commit rev was two
minor versions behind. Version badges are dropped from the ecosystem cards;
they went stale on their own.

The pages cross-link by section anchor now, and a stale anchor is invisible in
a rendered page — it just scrolls to the top. mkdocs validation for anchors and
unrecognized links is turned on, so --strict fails the deploy build instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
v2.13.0 shipped on 2026-08-04, so the changelog date that was a placeholder is
now the real one and needs no change. The five pre-commit `rev:` pins across
the guides, the landing page, the recipes and the configuration reference were
spread over four different versions, none of them current. The blog post keeps
its own pin — a dated post records what was true when it was written.

Adds #514 to the v2.13.0 documentation entry, which the release notes list
alongside the other three domain-move PRs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
The docs-sync job installed commit-check from main because the rule IDs this
site documents were merged but unreleased, and PyPI would have reported a
mismatch that was not real. v2.13.0 is on PyPI now, so that exception has
expired — and while it stood, the job was validating the site against code no
reader could install.

Left unpinned on purpose: the check is meaningful only against the version a
reader gets from `pip install commit-check`, and a pin would let the site and
the package drift until somebody remembered to raise it.

Verified against the released 2.13.0 rather than the working tree — all seven
checks pass, so the rule names, headings and documented defaults on the site
match the package as shipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 3a62d91
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a71d320cc55550008d4903c
😎 Deploy Preview https://deploy-preview-4--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR restructures documentation by consolidating pre-commit, GitHub Actions, organization-config, signoff, and AI-attribution guides into new Integrations and Policy guides, deletes several standalone pages, updates changelog anchors, refreshes cross-page links and version pins, adjusts mkdocs navigation/validation, and updates Netlify and mkdocs-hook redirects. The deploy workflow now installs commit-check from PyPI instead of the main branch.

Changes

Documentation consolidation and site routing

Layer / File(s) Summary
Deploy workflow package source change
.github/workflows/deploy.yml
The docs-sync job installs the released commit-check package from PyPI instead of the main branch, retaining pytest and adding transition comments.
New Integrations guide
docs/guides/integrations.md
Adds a guide covering pre-commit hooks, GitHub Actions setup, org-wide configuration inheritance, pull-request comments, dry-run mode, fork security, and staged rollout.
New Policy guide
docs/guides/policies.md
Adds a guide covering DCO signoff enforcement and AI-attribution policy modes, including CC013 failure semantics and bot exemptions.
Removal of superseded guides and pages
docs/guides/pre-commit.md, docs/guides/github-actions.md, docs/guides/organization.md, docs/guides/signoff.md, docs/guides/ai-attribution.md, docs/getting-started/installation.md, docs/getting-started/why.md, docs/projects.md, docs/what-is-new.md
Deletes standalone pages whose content is now covered by the Integrations and Policy guides and other consolidated pages.
Getting-started rewrite and cross-links
docs/getting-started.md
Expands installation instructions (pip, uv, pipx), adds version verification, a provenance-verification section, and updates internal links to rules.md, the integrations guide, and command-line recipes.
Homepage, configuration, and example doc updates
docs/index.md, docs/configuration.md, docs/example.md
Adds a rationale section and updated policy/integration links on the homepage; updates pre-commit example revisions to v2.13.0 and links to the integrations guide.
Changelog highlights and release anchors
docs/changelog.md
Adds a Highlights table and explicit Markdown anchors to release headings from v2.13.0 through v0.1.0.
Site navigation, validation, and redirects
mkdocs.yml, netlify.toml, scripts/mkdocs_hooks.py
Reworks mkdocs navigation and adds strict link/anchor validation; updates Netlify redirects for retired pages; adds MOVED_URLS and updated LEGACY_URLS mappings with redirect-stub generation for moved directories.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant GitHubActions as GitHub Actions
  participant SharedConfig as Shared cchk.toml
  participant CommitCheck as commit-check CLI

  Developer->>GitHubActions: push or pull_request
  GitHubActions->>SharedConfig: fetch inherited configuration
  SharedConfig-->>GitHubActions: merged configuration
  GitHubActions->>CommitCheck: run checks with merged config
  CommitCheck-->>GitHubActions: pass/fail result
  GitHubActions-->>Developer: pull-request comment or dry-run report
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: consolidating the documentation site and reducing its page count.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/refresh-sample-output

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shenxianpeng shenxianpeng added the documentation Improvements or additions to documentation label Aug 4, 2026
@shenxianpeng
shenxianpeng merged commit b6ea850 into main Aug 4, 2026
7 of 8 checks passed
@shenxianpeng
shenxianpeng deleted the chore/refresh-sample-output branch August 4, 2026 12:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/getting-started.md (1)

30-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Resolve the Markdownlint code-block warnings.

markdownlint-cli2 reports MD046 on the fenced blocks and MD014 on command prompts without output.

  • docs/getting-started.md#L30-L32: use the configured indented style, and remove the $ prompt or show command output.
  • docs/getting-started.md#L178-L180: apply the same style and command-prompt fix.
  • docs/index.md#L202-L225: keep the Mermaid block fenced for MkDocs rendering, and add a targeted MD046 exception instead of indenting it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/getting-started.md` around lines 30 - 32, Resolve the Markdownlint
warnings at docs/getting-started.md lines 30-32 and 178-180 by converting the
command blocks to the configured indented style and removing the $ prompts
unless command output is shown. Keep the Mermaid block at docs/index.md lines
202-225 fenced for MkDocs rendering and add a targeted MD046 exception for that
block.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/getting-started.md`:
- Around line 178-180: Update the gh attestation verify command in the
getting-started documentation to pass a single exact wheel path instead of the
commit_check-*.whl glob, or show a loop that verifies each wheel individually.

In `@docs/guides/integrations.md`:
- Around line 50-65: Update the Available hooks documentation to add a short
.pre-commit-config.yaml snippet containing the `- id: check-no-force-push` entry
in the hooks list immediately before the existing `pre-commit install
--hook-type pre-push` command.

---

Nitpick comments:
In `@docs/getting-started.md`:
- Around line 30-32: Resolve the Markdownlint warnings at
docs/getting-started.md lines 30-32 and 178-180 by converting the command blocks
to the configured indented style and removing the $ prompts unless command
output is shown. Keep the Mermaid block at docs/index.md lines 202-225 fenced
for MkDocs rendering and add a targeted MD046 exception for that block.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f3a41b21-f551-4ae7-ad5e-8300b0ab7ace

📥 Commits

Reviewing files that changed from the base of the PR and between 7ddc2b7 and 3a62d91.

📒 Files selected for processing (20)
  • .github/workflows/deploy.yml
  • docs/changelog.md
  • docs/configuration.md
  • docs/example.md
  • docs/getting-started.md
  • docs/getting-started/installation.md
  • docs/getting-started/why.md
  • docs/guides/ai-attribution.md
  • docs/guides/github-actions.md
  • docs/guides/integrations.md
  • docs/guides/organization.md
  • docs/guides/policies.md
  • docs/guides/pre-commit.md
  • docs/guides/signoff.md
  • docs/index.md
  • docs/projects.md
  • docs/what-is-new.md
  • mkdocs.yml
  • netlify.toml
  • scripts/mkdocs_hooks.py
💤 Files with no reviewable changes (9)
  • docs/guides/signoff.md
  • docs/guides/pre-commit.md
  • docs/getting-started/why.md
  • docs/guides/organization.md
  • docs/guides/github-actions.md
  • docs/guides/ai-attribution.md
  • docs/projects.md
  • docs/getting-started/installation.md
  • docs/what-is-new.md

Comment thread docs/getting-started.md
Comment on lines +178 to +180
```console
$ gh attestation verify commit_check-*.whl --repo commit-check/commit-check
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repo files =="
git ls-files | sed -n '1,120p'

echo "== target lines =="
if [ -f docs/getting-started.md ]; then
  nl -ba docs/getting-started.md | sed -n '160,195p'
fi

echo "== attestation occurrences =="
rg -n "gh attestation verify|commit_check-\\*\\.whl" .

echo "== gh attestation CLI help (if installed) =="
if command -v gh >/dev/null 2>&1; then
  gh attestation verify --help | sed -n '1,220p'
else
  echo "gh not installed"
fi

Repository: commit-check/commit-check.com

Length of output: 1132


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target lines =="
if [ -f docs/getting-started.md ]; then
  awk 'NR>=155 && NR<=190 { printf "%4d\t%s\n", NR, $0 }' docs/getting-started.md
fi

echo "== attestation occurrences =="
grep -RIn "gh attestation verify\|commit_check-\*\.whl" . || true

echo "== gh attestation CLI help (if installed) =="
if command -v gh >/dev/null 2>&1; then
  gh attestation verify --help | awk 'NR<=240 { print }'
else
  echo "gh not installed"
fi

echo "== static glob expansion probe =="
mkdir -p /tmp/attestation-probe
touch "/tmp/attestation-probe/commit_check-1.0.0-py3-none-any.whl"
touch "/tmp/attestation-probe/commit_check-1.0.0-linux_x86_64.whl"
printf 'sh_args='
(cd /tmp/attestation-probe && sh -c 'set -- commit_check-*.whl; printf "%s\n" "$@"' | awk '{ printf "%s ", "\"" $0 "\""; } END { print "" }')

Repository: commit-check/commit-check.com

Length of output: 10074


Pass one wheel path to gh attestation verify.

The commit_check-*.whl glob expands to multiple arguments when several platform wheels are present, but this command takes one artifact path. Use one exact wheel path or verify each wheel in a loop.

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 178-178: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


[warning] 179-179: Dollar signs used before commands without showing output

(MD014, commands-show-output)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/getting-started.md` around lines 178 - 180, Update the gh attestation
verify command in the getting-started documentation to pass a single exact wheel
path instead of the commit_check-*.whl glob, or show a loop that verifies each
wheel individually.

Comment on lines +50 to +65
### Available hooks

| Hook ID | Stage | Rules |
|---|---|---|
| `check-message` | `commit-msg` | [CC001–CC013](../rules.md#commit-message-rules) |
| `check-branch` | `pre-commit` | [CC201–CC202](../rules.md#branch-rules) |
| `check-author-name` | `pre-commit` | [CC101](../rules.md#cc101) |
| `check-author-email` | `pre-commit` | [CC102](../rules.md#cc102) |
| `check-no-force-push` | `pre-push` | [CC301](../rules.md#cc301) |

`check-no-force-push` also needs its own install:

```console
$ pre-commit install --hook-type pre-push
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add the missing hook-id snippet for check-no-force-push.

The table lists check-no-force-push as a pre-push hook, but no .pre-commit-config.yaml snippet shows adding - id: check-no-force-push to the hooks list. Line 62-64 only shows pre-commit install --hook-type pre-push. A reader who runs only that command activates the pre-push git hook wiring, but nothing runs at the pre-push stage because the hook itself was never added to the config.

Add a short snippet showing the hook entry before the install command.

📝 Proposed addition
 `check-no-force-push` also needs its own install:

+```yaml title=".pre-commit-config.yaml"
+      - id: check-no-force-push
+```
+
 ```console
 $ pre-commit install --hook-type pre-push
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
### Available hooks

| Hook ID | Stage | Rules |
|---|---|---|
| `check-message` | `commit-msg` | [CC001–CC013](../rules.md#commit-message-rules) |
| `check-branch` | `pre-commit` | [CC201–CC202](../rules.md#branch-rules) |
| `check-author-name` | `pre-commit` | [CC101](../rules.md#cc101) |
| `check-author-email` | `pre-commit` | [CC102](../rules.md#cc102) |
| `check-no-force-push` | `pre-push` | [CC301](../rules.md#no-force-push-rules) |

`check-no-force-push` also needs its own install:

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 63-63: Dollar signs used before commands without showing output

(MD014, commands-show-output)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/integrations.md` around lines 50 - 65, Update the Available hooks
documentation to add a short .pre-commit-config.yaml snippet containing the `-
id: check-no-force-push` entry in the hooks list immediately before the existing
`pre-commit install --hook-type pre-push` command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants