diff --git a/docs/assets/extra.css b/docs/assets/extra.css index 5aab2bf..a5fdfc1 100644 --- a/docs/assets/extra.css +++ b/docs/assets/extra.css @@ -7,6 +7,9 @@ /* The brand blue only reaches 4.2:1 on white; links need 4.5:1. */ --cc-link: #176b89; + /* The hero sits on brand blue, so its button is white rather than branded. */ + --cc-hero-button-bg: #ffffff; + --md-primary-fg-color: var(--cc-brand); --md-primary-fg-color--light: var(--cc-brand-light); --md-primary-fg-color--dark: var(--cc-brand-dark); @@ -23,38 +26,6 @@ --md-typeset-a-color: var(--cc-link); } -/* Landing page ------------------------------------------------------------- - The hero is the first thing a visitor sees, so it carries the value - proposition rather than a badge wall. */ -.cc-hero { - text-align: center; - padding: 3.5rem 1rem 2.5rem; -} - -.cc-hero h1 { - font-size: 2.9rem; - line-height: 1.15; - font-weight: 800; - letter-spacing: -0.02em; - margin: 0 0 0.6rem; -} - -.cc-hero p { - font-size: 1.05rem; - max-width: 40rem; - margin: 0 auto 1.8rem; - color: var(--md-default-fg-color--light); -} - -.cc-hero .md-button { - margin: 0.3rem; -} - -/* Hide the redundant H1 that MkDocs renders above a custom hero. */ -.cc-hero + hr { - display: none; -} - /* Feature grid: uses Material's card grid, tightened up a little. */ .md-typeset .grid.cards > ul > li { border-radius: 0.4rem; @@ -77,13 +48,6 @@ vertical-align: top; } -/* In the rule index tables only, keep codes, names and CLI flags on one line - so the tables stay scannable. Other tables hold long regexes and lists that - must stay wrappable. */ -.md-typeset table.rules-index td code { - white-space: nowrap; -} - /* Sidebar section headings ("Getting started", "Reference", ...) */ .md-nav__item--section > .md-nav__link { font-weight: 700; diff --git a/docs/blog/posts/configuring-commit-check.md b/docs/blog/posts/configuring-commit-check.md index 0d48817..08d310d 100644 --- a/docs/blog/posts/configuring-commit-check.md +++ b/docs/blog/posts/configuring-commit-check.md @@ -50,7 +50,7 @@ require_signed_off_by = false ignore_authors = ["dependabot[bot]", "renovate[bot]", "copilot[bot]"] [branch] -# https://conventional-branch.github.io/ +# https://conventionalbranch.org conventional_branch = true allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix"] ``` diff --git a/docs/blog/posts/introducing-commit-check.md b/docs/blog/posts/introducing-commit-check.md index e956e09..4dc80b9 100644 --- a/docs/blog/posts/introducing-commit-check.md +++ b/docs/blog/posts/introducing-commit-check.md @@ -60,7 +60,7 @@ pull request. You do not need a config file to begin. With no `cchk.toml`, Commit Check applies lenient, sensible defaults: commit messages should follow [Conventional Commits](https://www.conventionalcommits.org/) and branch names -should follow the [Conventional Branch](https://conventional-branch.github.io/) +should follow the [Conventional Branch](https://conventionalbranch.org/) convention. That is enough to get value on day one. ```bash diff --git a/docs/configuration.md b/docs/configuration.md index 04272c0..d67a25d 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,7 @@ # Configuration -`commit-check` can be configured in three ways with the following priority (highest to lowest): +`commit-check` reads its settings from four places, in this priority order +(highest to lowest): 1. **Command-line arguments** (`--subject-imperative=true`) 2. **Environment variables** (`CCHK_SUBJECT_IMPERATIVE=true`) diff --git a/docs/demo.gif b/docs/demo.gif deleted file mode 100644 index 09de303..0000000 Binary files a/docs/demo.gif and /dev/null differ diff --git a/docs/demo.tape b/docs/demo.tape deleted file mode 100644 index e2e2fd8..0000000 --- a/docs/demo.tape +++ /dev/null @@ -1,39 +0,0 @@ -# demo.tape — Generate demo.gif with: brew install vhs && vhs docs/demo.tape - -Output demo.gif - -Set Shell "zsh" - -Set FontSize 16 -Set Width 1000 -Set Height 550 -Set Theme "Dracula" -Set Padding 24 -Set TypingSpeed 50ms -Set PlaybackSpeed 1.0 - -# --- Scene 1: Invalid commit message --- -Type "echo 'add user login' | commit-check -m" -Enter -Sleep 2s - -# --- Scene 2: Valid commit message --- -Type "echo 'feat: add user login' | commit-check -m" -Enter -Sleep 2s - -# --- Scene 4: Invalid branch name --- -Type "git checkout -b user-login" -Enter -Sleep 2s -Type "commit-check -b" -Enter -Sleep 2s - -# --- Scene 5: Valid branch name --- -Type "git checkout -b feature/user-login" -Enter -Sleep 2s -Type "commit-check -b" -Enter -Sleep 2s diff --git a/docs/index.md b/docs/index.md index adff20c..fa4d36e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,7 +9,12 @@ description: Enforce commit message, branch naming, author and signoff standards -# Commit Check + + +# Commit Check { .cc-page-title } ## One config, enforced everywhere diff --git a/docs/overrides/home.html b/docs/overrides/home.html index 7900d38..7e01768 100644 --- a/docs/overrides/home.html +++ b/docs/overrides/home.html @@ -2,12 +2,12 @@ {% block hero %}
Clean commits. Clear standards.
-
+
Get started
diff --git a/docs/overrides/main.html b/docs/overrides/main.html
index 6d9c684..4451dce 100644
--- a/docs/overrides/main.html
+++ b/docs/overrides/main.html
@@ -1,5 +1,16 @@
{% extends "base.html" %}
+{# The landing page sets `title: Commit Check` so its social card and search
+ entry are not labelled "Home". Material appends the site name to any page
+ that carries a meta title, which on this one page repeats it. #}
+{% block htmltitle %}
+ {% if page.is_homepage %}
+ is the page's visible title; .cc-page-title below is the hidden
+ counterpart that keeps Material from injecting a second one. */
.hero {
text-align: center;
- padding: 4rem 0;
+ padding: 4rem 1rem;
background: var(--md-primary-fg-color);
color: var(--md-primary-bg-color);
}
+/* Material renders a title into any page whose content has none, using the nav
+ label — "Home" here, competing with the hero above it. The page carries this
+ heading purely to suppress that. */
+.md-typeset .cc-page-title {
+ display: none;
+}
+
+/* With the title hidden, the "edit this page" pencil is left floating alone in
+ the corner. A landing page is not one anybody edits. */
+.md-content__inner:has(> .cc-page-title) .md-content__button {
+ display: none;
+}
+
+/* Scales down rather than overflowing the viewport: at a flat 3rem the title
+ was wider than a phone screen and clipped at both ends. */
.hero h1 {
- font-size: 3rem;
+ font-size: clamp(2rem, 8vw, 3rem);
font-weight: 700;
margin-bottom: 1rem;
- text-shadow: 0 2px 4px rgba(0,0,0,0.3);
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
text-align: center;
color: unset;
}
+/* The permalink anchor every heading gets is noise on a hero title. */
+.hero h1 .headerlink {
+ display: none;
+}
+
.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
opacity: 0.9;
- width: 65%;
+ width: min(96%, 34rem);
margin-left: auto;
margin-right: auto;
}
.hero .twemoji {
- --md-icon-size: 1.125em;
- display: inline-flex;
- height: var(--md-icon-size);
- vertical-align: text-top;
+ --md-icon-size: 1.125em;
+
+ display: inline-flex;
+ height: var(--md-icon-size);
+ vertical-align: text-top;
}
.hero .md-button {
- background: var(--commit-check-logo-color-yellow);
+ background: var(--cc-hero-button-bg);
color: black;
border: none;
border-radius: unset;
@@ -63,28 +88,7 @@ th {
color: black;
}
-@keyframes gradientShift {
- 0% { background-position: 0% 50%; }
- 50% { background-position: 100% 50%; }
- 100% { background-position: 0% 50%; }
-}
-
-/* Card enhancements */
-.md-typeset .grid.cards > .card-content {
- background: var(--md-default-bg-color);
- border: 1px solid var(--md-default-fg-color--lightest);
- border-radius: 0.5rem;
- padding: 1.5rem;
- transition: all 0.3s ease;
-}
-
-.md-typeset .grid.cards > .card-content:hover {
- transform: translateY(-2px);
- box-shadow: 0 8px 25px rgba(0,0,0,0.1);
- border-color: var(--md-primary-fg-color);
-}
-
-/* Community section styling */
+/* Community section -------------------------------------------------------- */
.community-section {
background: var(--md-default-fg-color--lightest);
padding: 3rem 2rem;
@@ -113,10 +117,10 @@ th {
.md-button:hover {
transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
-/* Trusted by section styling */
+/* Trusted-by section ------------------------------------------------------- */
.trusted-by {
text-align: center;
padding: 3rem 0;
@@ -151,7 +155,7 @@ th {
.logo-item:hover {
transform: translateY(-4px);
background: var(--md-default-bg-color);
- box-shadow: 0 8px 25px rgba(0,0,0,0.1);
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.logo-item img {
@@ -173,303 +177,42 @@ th {
color: var(--md-default-fg-color--light);
}
-.stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
- gap: 2rem;
- padding: 0 2rem;
-}
-
-.stat {
- text-align: center;
-}
-
-.stat strong {
- display: block;
- font-size: 2rem;
- font-weight: 700;
- color: var(--md-primary-fg-color);
- margin-bottom: 0.5rem;
-}
-
-.stat span {
- font-size: 0.9rem;
- color: var(--md-default-fg-color--light);
- text-transform: uppercase;
- letter-spacing: 0.5px;
-}
-
-/* Mobile responsiveness for trusted by section */
@media screen and (max-width: 768px) {
.logo-grid {
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
padding: 0 1rem;
}
-
- .stats-grid {
- grid-template-columns: repeat(2, 1fr);
- padding: 0 1rem;
- }
-
- .stat strong {
- font-size: 1.5rem;
- }
-}
-
-/* Ensure tab items have proper contrast */
-.md-tabs__item {
- background-color: transparent;
-}
-
-.md-tabs__link {
- color: rgba(255, 255, 255, 0.7);
-}
-
-.md-tabs__link--active,
-.md-tabs__link:hover {
- color: white;
}
+/* Mobile navigation drawer -------------------------------------------------
+ Material leaves this at its own default indigo, which clashes with the
+ header right above it. */
@media screen and (max-width: 76.2344em) {
.md-nav--primary .md-nav__title[for="__drawer"] {
- background-color: #4051b5;
+ background-color: var(--md-primary-fg-color);
}
}
+/* "important" admonition, which Material ships without a colour of its own. */
.md-typeset .admonition.important,
.md-typeset details.important {
border-color: #00b8d4;
}
-.md-typeset .important>.admonition-title::before,
-.md-typeset .important>summary::before {
+.md-typeset .important > .admonition-title::before,
+.md-typeset .important > summary::before {
background-color: #00b8d4;
-webkit-mask-image: var(--md-admonition-icon--info);
mask-image: var(--md-admonition-icon--info);
}
-.md-typeset .important>.admonition-title,
-.md-typeset .important>summary {
+.md-typeset .important > .admonition-title,
+.md-typeset .important > summary {
background-color: #00b8d41a;
}
-@keyframes heart {
-
- 0%,
- 40%,
- 80%,
- to {
- transform: scale(1)
- }
-
- 20%,
- 60% {
- transform: scale(1.15)
- }
-}
-
-.md-typeset .mdx-heart {
- animation: heart 1s infinite
-}
-
-.md-typeset .mdx-badge {
- font-size: .85em
-}
-
-.md-typeset .mdx-badge--heart {
- color: #ff4281;
-}
-
-.md-typeset .mdx-badge--heart.twemoji {
- animation: heart 1s infinite
-}
-
-.md-typeset .mdx-badge--right {
- float: right;
- margin-left: .35em
-}
-
-[dir=ltr] .md-typeset .mdx-badge__icon {
- border-top-left-radius: .1rem
-}
-
-[dir=rtl] .md-typeset .mdx-badge__icon {
- border-top-right-radius: .1rem
-}
-
-[dir=ltr] .md-typeset .mdx-badge__icon {
- border-bottom-left-radius: .1rem
-}
-
-[dir=rtl] .md-typeset .mdx-badge__icon {
- border-bottom-right-radius: .1rem
-}
-
-.md-typeset .mdx-badge__icon {
- background: var(--md-accent-fg-color--transparent);
- padding: .2rem
-}
-
-.md-typeset .mdx-badge__icon:last-child {
- border-radius: .1rem
-}
-
-[dir=ltr] .md-typeset .mdx-badge__text {
- border-top-right-radius: .1rem
-}
-
-[dir=rtl] .md-typeset .mdx-badge__text {
- border-top-left-radius: .1rem
-}
-
-[dir=ltr] .md-typeset .mdx-badge__text {
- border-bottom-right-radius: .1rem
-}
-
-[dir=rtl] .md-typeset .mdx-badge__text {
- border-bottom-left-radius: .1rem
-}
-
-.md-typeset .mdx-badge__text {
- box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent);
- padding: .2rem .3rem
-}
-
-.md-typeset .mdx-social {
- height: min(27rem, 80vw);
- position: relative
-}
-
-.md-typeset .mdx-social:hover .mdx-social__image {
- background-color: #e4e4e40d
-}
-
-.md-typeset .mdx-social__layer {
- margin-top: 4rem;
- position: absolute;
- transform-style: preserve-3d;
- transition: .25s cubic-bezier(.7, 0, .3, 1)
-}
-
-.md-typeset .mdx-social__layer:hover .mdx-social__label {
- opacity: 1
-}
-
-.md-typeset .mdx-social__layer:hover .mdx-social__image {
- background-color: #7f7f7ffc
-}
-
-.md-typeset .mdx-social__layer:hover~.mdx-social__layer {
- opacity: 0
-}
-
-.md-typeset .mdx-social__image {
- box-shadow: -.25rem .25rem .5rem #0000000d;
- transform: rotate(-40deg) skew(15deg, 15deg) scale(.7);
- transition: all .25s
-}
-
-.md-typeset .mdx-social__image img {
- display: block
-}
-
-.md-typeset .mdx-social__label {
- background-color: var(--md-default-fg-color--light);
- color: var(--md-default-bg-color);
- display: block;
- opacity: 0;
- padding: .2rem .4rem;
- position: absolute;
- transition: all .25s
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(6) {
- transform: translateY(-30px)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(5) {
- transform: translateY(-20px)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(4) {
- transform: translateY(-10px)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(3) {
- transform: translateY(0)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(2) {
- transform: translateY(10px)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:first-child {
- transform: translateY(20px)
-}
-
-.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(0) {
- transform: translateY(30px)
-}
-
-.md-banner {
- color: var(--md-footer-fg-color--lighter)
-}
-
-.md-banner strong {
- white-space: nowrap
-}
-
-.md-banner a,
-.md-banner strong {
- color: var(--md-footer-fg-color)
-}
-
-.md-banner a:focus,
-.md-banner a:hover {
- color: currentcolor
-}
-
-.md-banner a:focus .twemoji,
-.md-banner a:hover .twemoji {
- background-color: var(--md-footer-fg-color);
- box-shadow: none
-}
-
-.md-banner .twemoji {
- border-radius: 100%;
- box-shadow: inset 0 0 0 .05rem currentcolor;
- display: inline-block;
- height: 1.2rem;
- padding: .25rem;
- transition: all .25s;
- vertical-align: bottom;
- width: 1.2rem
-}
-
-.md-banner .twemoji svg {
- display: block;
- max-height: none
-}
-
-/* annotation buttons' pulse animation */
+/* Annotation markers are round, matching the numbered badges they pair with. */
a.md-annotation__index {
border-radius: 2.2ch;
}
-
-@keyframes pulse {
- 0% {
- box-shadow: 0 0 0 0 var(--md-accent-fg-color);
- transform: scale(.95)
- }
-
- 75% {
- box-shadow: 0 0 0 .625em transparent;
- transform: scale(1)
- }
-
- to {
- box-shadow: 0 0 0 0 transparent;
- transform: scale(.95)
- }
-}
diff --git a/docs/troubleshoot.md b/docs/troubleshoot.md
index a84ca41..6eacc8d 100644
--- a/docs/troubleshoot.md
+++ b/docs/troubleshoot.md
@@ -11,10 +11,10 @@ check committer name.....................................................Failed
Commit rejected by Commit-Check.
-Type author_name check failed => 12
-It doesn't match regex: ^[A-Za-zÀ-ÖØ-öø-ÿ\u0100-\u017F\u0180-\u024F ,.\'-]+$|.*(\[bot])
+CC101 author-name check failed ==> 12
The committer name seems invalid
-Suggest: run command `git config user.name "Your Name"`
+Suggest: git config user.name 'Your Name'
+Docs: https://commit-check.com/rules/#cc101
```
To fix it, you can either update your Git config or temporarily skip the check using one of the following methods.