docs: add social cards and cut the two pages that repeated themselves - #517
docs: add social cards and cut the two pages that repeated themselves#517shenxianpeng wants to merge 2 commits into
Conversation
Sharing a documentation link produced a bare URL with no preview image. The social plugin now renders one card per page — the page title on the brand blue, at the 1200x630 the platforms expect — and the pages carry the og:image tag that points at it. Deploy previews skip the cards. Nobody shares a preview link for its preview image, and skipping them keeps those builds fast and clear of the system cairo dependency that rendering needs. Rewrite the two pages left over from the Sphinx site, both of which had been overtaken by the pages written around them. "Usage examples" opened with sections on running the checks as a GitHub Action and as a pre-commit hook — both of which now have guides of their own that go further. Removed, and what remains is what the page is for and what its navigation entry already called it: recipes for invoking the CLI. The scripting section now covers the output formats a script actually reaches for, and the jq example was checked against real output rather than written from memory. "What's New" re-explained every feature a second time, next to a changelog that already recorded them and guides that now document them properly. It is now an index: what changed, why it mattered, and a link to the page that covers it. 365 lines to 76.
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe documentation now provides command-line recipes and concise release highlights. MkDocs social card generation is configured with imaging support, CI Cairo installation, and disabled Netlify preview builds. Cache directories are ignored. ChangesDocumentation updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #517 +/- ##
==========================================
+ Coverage 97.34% 97.43% +0.08%
==========================================
Files 12 12
Lines 1207 1207
==========================================
+ Hits 1175 1176 +1
+ Misses 32 31 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/example.md`:
- Around line 173-179: Update the range-check script around the `git rev-list`
loop to execute and validate `git rev-list -n "${1:-10}" HEAD` before iteration,
exiting nonzero if it fails so invalid ranges or non-Git directories cannot
succeed. Iterate over the validated revision output, and enable `pipefail` if
required so failures from the `git log | commit-check` pipeline affect the final
status.
In `@docs/what-is-new.md`:
- Around line 23-37: Add a 2.8.0 release entry to docs/what-is-new.md between
the existing 2.9.0 and earlier release sections, using the established
version-heading style and a concise highlight sourced from the v2.8.0 entry in
docs/changelog.md. Include a link to the changelog consistent with the
surrounding release highlights.
🪄 Autofix (Beta)
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: f12f49c4-e9f5-4bce-bb08-99f99f7b8985
📒 Files selected for processing (7)
.github/workflows/main.yml.gitignoredocs/example.mddocs/what-is-new.mdmkdocs.ymlnetlify.tomlpyproject.toml
The check-recent.sh recipe expanded git rev-list inside the for loop, so a failure produced an empty list and the script exited 0: run outside a repository, or against an unreadable revision, it reported success without checking anything. Resolve the revisions first and exit on failure. Add the missing 2.8.0 entry: it introduced message_pattern and dropped Python 3.9, which is the kind of change the highlights page exists for.
|
Merging this PR will improve performance by ×12
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|



Two follow-ups from #515.
Social cards
Sharing a documentation link produced a bare URL with no preview image. The social plugin now renders one card per page, and each page carries the
og:imagetag pointing at it.Verified locally rather than assumed — 17 cards generated, at the size the platforms expect:
Deploy previews skip the cards. Nobody shares a preview link for its preview image, and skipping them keeps those builds fast and free of the system cairo dependency that rendering needs:
The GitHub Pages job installs
libcairo2explicitly.cairosvgdlopens it at runtime rather than bundling it, and I could not verify whether the runner image already carries it — so the workflow no longer depends on that being true.The two leftover pages
Both were carried over from the Sphinx site converted but not rewritten, and both had since been overtaken by the pages written around them.
example.md— 374 → 191 lines. It opened with "Running as GitHub Action" and "Running as pre-commit hook", which now have guides of their own that go considerably further. Removed. What remains is what its navigation entry already called it: recipes for invoking the CLI — checking a message from the repository, a file or stdin; branch, committer and force-push checks; pointing at a different config; and the output formats a script actually reaches for.The
jqexample was checked against real output, not written from memory — my first attempt usedselect(.passed | not), and the field isstatus:what-is-new.md— 365 → 76 lines. It re-explained every feature a second time, next to a changelog that already recorded them and guides that now document them properly. Every section had somewhere better to point: AI attribution to its guide and CC013, force push to CC301,inherit_fromto the organization guide, 2.0.0 to the migration page. It is now an index — what changed, why it mattered, and a link — with the changelog remaining the full record.Testing
Cross-page anchors used by the rewritten pages were checked against the rendered HTML (
example/#blocking-force-pushes,example/#output-for-scripts-and-ci) rather than assumed to exist.The one failing test,
test_load_config_file_permission_error, reproduces onmainand is unrelated: it usesos.chmod(0o000), which does not restrict root.Summary by CodeRabbit
Documentation
Chores