Skip to content

Refactor landing page hero and clean up stylesheet - #6

Merged
shenxianpeng merged 5 commits into
mainfrom
claude/refresh-sample-output-602anc
Aug 5, 2026
Merged

Refactor landing page hero and clean up stylesheet#6
shenxianpeng merged 5 commits into
mainfrom
claude/refresh-sample-output-602anc

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Restructured the landing page hero from a template-based approach to inline markdown, consolidated hero styling into the main stylesheet, and removed unused CSS rules and assets.

Key Changes

Landing Page Structure:

  • Moved hero from overrides/home.html template to inline HTML/markdown in index.md
  • Removed template: home.html from index.md frontmatter
  • Updated overrides/main.html to prevent duplicate page titles on homepage

Stylesheet Consolidation:

  • Migrated hero styling from docs/assets/extra.css to docs/stylesheets/extra.css
  • Removed .cc-hero class definitions and moved equivalent styles to .hero class
  • Added comprehensive comments documenting each section (hero, community, trusted-by, etc.)
  • Improved hero responsiveness with clamp() for font sizing and min() for paragraph width
  • Added negative margins to hero to extend to content column edges
  • Hidden the permalink anchor (.headerlink) on hero title
  • Hidden the "edit this page" button on pages with hero content using :has() selector

CSS Improvements:

  • Removed unused animations (@keyframes gradientShift, @keyframes heart, @keyframes pulse)
  • Removed unused card enhancement styles
  • Removed unused stats grid and badge styles
  • Removed unused social layer and banner styles
  • Cleaned up tab styling rules
  • Replaced hardcoded color #4051b5 with var(--md-primary-fg-color) for consistency
  • Replaced custom color variable --commit-check-logo-color-yellow with --cc-hero-button-bg
  • Fixed whitespace formatting in rgba() color values for consistency
  • Added spacing around CSS child combinators (>) for readability

Removed Assets:

  • Deleted docs/demo.tape (VHS demo script)
  • Deleted docs/demo.gif (generated demo animation)
  • Deleted docs/static/logo.png

Added Files:

  • Added docs/robots.txt for search engine crawling directives

Documentation Updates:

  • Updated error message format in troubleshoot.md to reflect new error code format
  • Fixed conventional branch URL in blog posts
  • Minor configuration documentation clarifications

https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn

Summary by CodeRabbit

  • New Features
    • Added a refreshed documentation homepage with an inline hero, responsive styling, and improved call-to-action presentation.
    • Added crawler access rules and sitemap discovery.
  • Documentation
    • Clarified configuration priority, including built-in defaults.
    • Updated Conventional Branch links and troubleshooting guidance.
    • Corrected documented author-name validation output and Git configuration instructions.
  • Style
    • Simplified documentation styling and improved mobile navigation theme consistency.
  • Chores
    • Removed obsolete landing-page templates and demo script.

claude added 3 commits August 5, 2026 09:57
The author-name failure in the troubleshooting page was still in the
pre-2.13 format: no rule ID, `Type ... => ` instead of `CC101 ... ==> `,
an "It doesn't match regex:" line the package no longer prints at all,
and no `Docs:` link.

tests/docs_sync_test.py did not catch it. Its guard matches
`(CC\d{3}) (\S+) check failed ==>`, which only describes the *new*
format, so a sample still written in the old one is invisible to it.

Also: the configuration page announced "three ways" above a list of
four, and the two blog posts linked Conventional Branch at its old
GitHub Pages URL while every other page uses conventionalbranch.org.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
The page carried two: one from the hero in overrides/home.html and one
from index.md's own `# Commit Check`. Removing the markdown heading made
it worse — Material injects a heading into any page whose content has
none, so the page ended up titled "Commit Check" and "Home" at once.

Move the hero into index.md instead. Its H1 is then part of the page
content, nothing is injected, and the template override is no longer
needed. Three things follow from the hero now sitting inside the content
column: the "edit this page" pencil floated into it (hidden — a landing
page is not one anybody edits), the title needed negative margins to
still reach the column edges, and it needed a responsive size, having
overflowed the viewport at a flat 3rem on a phone.

The hero's primary button also pointed at getting-started/quickstart/, a
URL retired when that page was merged away, so the landing page's main
call to action went through a client-side redirect stub.

Drop the CSS that nothing selects: a second, unused hero implementation
(.cc-hero, including a rule meant to hide exactly the duplicate heading
above), .stats-grid, .mdx-*, .md-banner, .card-content, .md-tabs__*,
table.rules-index, and two keyframes nothing animates. The mobile drawer
was hardcoded to Material's default indigo rather than the brand blue
beside it, and --commit-check-logo-color-yellow held #ffffff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
docs/demo.gif is 611 KB of the docs directory's 868 KB and nothing links
to it; demo.tape (the script that generated it) and static/logo.png are
unreferenced too. All three were copied into every build and deployed.

Add robots.txt so the generated sitemap.xml is announced rather than
left for crawlers to guess at.

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

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 60973b5
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a7310e16de5d100083fdbdf
😎 Deploy Preview https://deploy-preview-6--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 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@shenxianpeng, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1fa9a83-c91d-434a-ade3-beb63fc9dd79

📥 Commits

Reviewing files that changed from the base of the PR and between e753f8e and 60973b5.

📒 Files selected for processing (3)
  • docs/index.md
  • docs/overrides/home.html
  • docs/stylesheets/extra.css
📝 Walkthrough

Walkthrough

The documentation site now uses an inline homepage hero, revised shared styling, updated documentation links and configuration guidance, corrected troubleshooting output, and a new robots.txt. The previous homepage override and VHS demo script were removed.

Changes

Documentation site refresh

Layer / File(s) Summary
Homepage rendering
docs/index.md, docs/overrides/home.html, docs/overrides/main.html
The homepage defines its own title, description, hero content, and getting-started link. The main template renders the site name only on the homepage. The dedicated home template was removed.
Homepage and site styling
docs/assets/extra.css, docs/stylesheets/extra.css
Hero layout and theme styling were updated. Obsolete card, animation, statistics, tab, and demo styles were removed. Navigation, admonition, and annotation styles were retained or updated.
Documentation content and crawling
docs/blog/posts/*.md, docs/configuration.md, docs/robots.txt, docs/troubleshoot.md, docs/demo.tape
Conventional Branch links, configuration priority, and CC101 troubleshooting guidance were updated. Crawler access and sitemap directives were added. The VHS demo script was removed.

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

Suggested labels: documentation

🚥 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 main landing page hero refactor and related stylesheet cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/refresh-sample-output-602anc

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.

@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: 1

🤖 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/stylesheets/extra.css`:
- Around line 53-58: Update the .hero .twemoji rule by inserting a blank line
between the --md-icon-size custom property and the display declaration to
satisfy declaration-empty-line-before.
🪄 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: e83ecdf3-9af3-4630-9930-d0d195cbf8d5

📥 Commits

Reviewing files that changed from the base of the PR and between ea60e6e and e753f8e.

⛔ Files ignored due to path filters (2)
  • docs/demo.gif is excluded by !**/*.gif
  • docs/static/logo.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • docs/assets/extra.css
  • docs/blog/posts/configuring-commit-check.md
  • docs/blog/posts/introducing-commit-check.md
  • docs/configuration.md
  • docs/demo.tape
  • docs/index.md
  • docs/overrides/home.html
  • docs/overrides/main.html
  • docs/robots.txt
  • docs/stylesheets/extra.css
  • docs/troubleshoot.md
💤 Files with no reviewable changes (2)
  • docs/overrides/home.html
  • docs/demo.tape

Comment thread docs/stylesheets/extra.css
claude added 2 commits August 5, 2026 10:11
…fter it

Stylelint's declaration-empty-line-before flags a declaration that
directly follows a custom property. The rule predates this branch — the
block moved here unchanged — but it is the file's only occurrence, so
fixing it costs a blank line and leaves nothing behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
Moving the hero into the page content to fix the duplicate heading put it
inside the width-capped content column, so its blue background stopped at
the column edges and left white gutters either side — visibly narrower
than the production landing page.

Put it back in the template, where it spans the window with no full-bleed
hack, and keep the heading fix by giving index.md a hidden `# Commit
Check`. That heading exists only to stop Material injecting one of its
own: the injected title uses the nav label, "Home", which is what made
the landing page show two competing headings in the first place. The
hidden copy is display:none, so it is out of the accessibility tree and
the hero's remains the only heading a reader or a crawler sees.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
@shenxianpeng
shenxianpeng merged commit 9af5233 into main Aug 5, 2026
8 checks passed
@shenxianpeng
shenxianpeng deleted the claude/refresh-sample-output-602anc branch August 5, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants