Skip to content

Commit 25057d9

Browse files
authored
feat: build the site with the Sumi theme (#74)
Moves the site from Material for MkDocs to [Sumi](https://sumi.mkdocs-ng.org/), the MkDocs NG theme. The landing page looks the same as today. The docs pages keep the brand colours, fonts and page width, inside Sumi's own header, sidebar, search and page actions. Every page and blog post keeps its URL. ## Before and after **Landing page, light** ![Landing page, light](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/home-light.png) **Landing page, dark** ![Landing page, dark](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/home-dark.png) **Landing page, whole page** ![Landing page, whole page](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/home-full.png) **Docs page** ![Getting started](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/getting-started.png) **Docs page, dark** ![Rules, dark](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/rules-dark.png) **Blog index** ![Blog](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/blog.png) **Phone** ![Landing page on a phone](https://github.com/commit-check/commit-check.com/raw/5eff23597f2444071e7a540bdc51f3c252029259/pr-shots/mobile-home.png) ## What changed - `mkdocs.yml`: `theme: sumi` and the `sumi` plugin. Material's `blog` and `social` plugins and the Material emoji extension are gone. - `docs/assets/extra.css`: the brand palette (Ink, Signal Blue, Paper), Instrument Sans / JetBrains Mono / Bricolage Grotesque, the 1220px page width and an Ink footer, all set through Sumi's `--sumi-*` variables. `docs/stylesheets/extra.css` held Material-only rules for a hero nothing uses any more and is removed, with `overrides/home.html`. - `overrides/landing.html` and `main.html` rewritten for Sumi's template blocks. `landing.css` keeps its rules; only the part that reached into Material's header and page frame changed. `landing.js` now loads on the landing page only. - Blog: Sumi takes a post's URL from its file name, so the posts are renamed `YYYY-MM-DD-<current slug>.md` and every post URL is unchanged. Material's archive and category pages redirect to the blog index (`scripts/mkdocs_hooks.py`). The index now has tag filters, a card view and an Atom feed at `/blog/feed.xml`. - Share image: Sumi does not generate per-page cards, so every page uses the current home card (`docs/assets/social.png`). CI and Netlify no longer need cairo. - Two code annotations (`# (1)!`) are plain `# (1)` comments, with the numbered note under the block as before. The two Material icons on Getting started are Sumi icons. ## What is different from today - Header: Sumi's search box with Ctrl K, and a GitHub icon without the version / stars / forks counter. - Sidebar sections collapse, pages show breadcrumbs and a "Copy as Markdown" menu, and each page also has a Markdown copy next to it. - On a phone the landing page has no menu button (the docs pages do). - Blog posts show Sumi's computed reading time, not the `readtime` front matter. - The footer says "Built with MkDocs and Sumi". ## Checks - `mkdocs build --strict` passes, and `pytest tests/` passes (18). - Every URL the current build serves is still served, plus `/print/` and `/blog/feed.xml`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Updated the documentation site with a refreshed theme, typography, colors, and page styling. * Added redirects from retired blog archive and category pages to the blog. * **Bug Fixes** * Removed the need for system libraries during documentation builds. * Updated a blog link to use the correct dated address. * **Documentation** * Clarified site build requirements and how blog post filenames determine their URLs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
1 parent f70a92b commit 25057d9

22 files changed

Lines changed: 254 additions & 569 deletions

‎.github/workflows/deploy.yml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ jobs:
5454
with:
5555
python-version: '3.x'
5656

57-
# The social plugin renders the share cards through cairo, which cairosvg
58-
# loads at runtime rather than bundling.
59-
- name: Install cairo
60-
run: sudo apt-get install -y --no-install-recommends libcairo2
61-
6257
- name: Build site
6358
run: pipx run nox -s docs
6459

‎README.md‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,17 @@ Or through nox, which manages the environment for you:
3535
$ nox -s docs-live
3636
```
3737

38-
Building the share cards needs cairo on the system (`libcairo2` on Debian and
39-
Ubuntu, `cairo` from Homebrew on macOS). To skip them while writing:
40-
41-
```console
42-
$ SOCIAL_CARDS=false mkdocs serve
43-
```
38+
The site uses [Sumi](https://sumi.mkdocs-ng.org/), the MkDocs NG theme. It
39+
needs no system libraries and fetches nothing at build time.
4440

4541
## Layout
4642

4743
| Path | Contents |
4844
| --- | --- |
49-
| `docs/index.md` | Landing page. Renders through `docs/overrides/home.html`. |
45+
| `docs/index.md` | Landing page. Renders through `docs/overrides/landing.html`. |
5046
| `docs/getting-started/`, `docs/guides/` | Tutorials and how-to guides. |
5147
| `docs/rules.md`, `docs/configuration.md` | Reference. |
52-
| `docs/blog/` | Blog, published with Material's blog plugin. |
48+
| `docs/blog/` | Blog, published by Sumi. A post's file name, `YYYY-MM-DD-slug.md`, sets its URL. |
5349
| `docs/overrides/`, `docs/stylesheets/`, `docs/assets/` | Theme, styles, brand assets. |
5450
| `scripts/mkdocs_hooks.py` | Redirect stubs for the URLs the old Sphinx site served. |
5551

‎docs/assets/extra.css‎

Lines changed: 124 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Brand palette -----------------------------------------------------------
2-
Material's "custom" primary/accent read these variables.
2+
Sumi reads every colour, font and size from its --sumi-* variables, so the
3+
brand is applied by pointing those at the Commit Check palette.
34
4-
Ink is the brand's dark and Signal Blue its accent. The header and footer
5-
are Ink on every page, so the docs and the landing page share one frame;
6-
Signal Blue is the same #2c9ccd the README badge has always used, so badges
7-
already in the wild still match. */
5+
Ink is the brand's dark and Signal Blue its accent. Signal Blue is the same
6+
#2c9ccd the README badge has always used, so badges already in the wild
7+
still match. Paper is the cool grey of the tinted bands. */
88
:root {
99
--cc-ink: #0b1620;
1010
--cc-ink-raised: #13212c;
@@ -14,113 +14,162 @@
1414
/* The brand blue only reaches 3.1:1 on white; links need 4.5:1. */
1515
--cc-link: #176b89;
1616

17-
--md-primary-fg-color: var(--cc-ink);
18-
--md-primary-fg-color--light: var(--cc-ink-raised);
19-
--md-primary-fg-color--dark: #060d13;
20-
--md-accent-fg-color: var(--cc-brand-dark);
21-
22-
/* A literal stack: the theme defines --md-text-font-family below :root,
23-
so a var() of it here would resolve to nothing. */
17+
/* Literal stacks rather than var()s of each other, so each one can be read
18+
on its own. */
2419
--cc-display-font: "Bricolage Grotesque", "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
20+
--sumi-font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
21+
"Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
22+
--sumi-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
23+
24+
--sumi-accent: var(--cc-brand);
25+
--sumi-accent-ink: var(--cc-link);
26+
--sumi-bg: #ffffff;
27+
--sumi-bg-elev: #ffffff;
28+
--sumi-bg-soft: #f4f6f7;
29+
--sumi-bg-sunken: #eef2f4;
30+
--sumi-fg: #0e1b24;
31+
--sumi-fg-2: #4f6270;
32+
--sumi-fg-3: #6a7c89;
33+
--sumi-line: #dce3e8;
34+
--sumi-line-2: #c9d3da;
35+
--sumi-link: var(--cc-link);
36+
--sumi-link-hover: #0f5570;
37+
--sumi-header-bg: rgba(255, 255, 255, 0.9);
38+
--sumi-code-bg: #f6f8f9;
39+
--sumi-code-head: #eef2f4;
40+
--sumi-code-inline: #eef2f4;
41+
42+
/* The page width the site has always had: a 1220px column with the header
43+
aligned to it, and both sidebars at the same width. */
44+
--cc-page-w: 1220px;
45+
--sumi-side-w: 242px;
46+
--sumi-rail-w: 242px;
47+
--sumi-header-h: 48px;
2548
}
2649

27-
/* The theme sets the footer colours per scheme, so they are overridden per
28-
scheme too; on :root alone they would lose to the theme's own. */
29-
[data-md-color-scheme="default"],
30-
[data-md-color-scheme="slate"] {
31-
--md-footer-bg-color: #081119;
32-
--md-footer-bg-color--dark: #060d13;
50+
[data-theme="dark"] {
51+
--sumi-accent: var(--cc-brand);
52+
--sumi-accent-ink: var(--cc-brand-light);
53+
--sumi-bg: #0e1a23;
54+
--sumi-bg-elev: #13212c;
55+
--sumi-bg-soft: #13212c;
56+
--sumi-bg-sunken: #0b1620;
57+
--sumi-fg: #e8eef2;
58+
--sumi-fg-2: #b9c7d1;
59+
--sumi-fg-3: #8fa3b1;
60+
--sumi-line: #22323f;
61+
--sumi-line-2: #2e4252;
62+
--sumi-link: var(--cc-brand-light);
63+
--sumi-link-hover: #7fc6e6;
64+
--sumi-header-bg: rgba(11, 22, 32, 0.9);
65+
--sumi-code-bg: #0b1620;
66+
--sumi-code-head: #13212c;
67+
--sumi-code-inline: #13212c;
3368
}
3469

35-
[data-md-color-scheme="slate"] {
36-
/* Material tints every slate grey from one hue; 205 is Ink's. */
37-
--md-hue: 205;
38-
--md-default-bg-color: #0e1a23;
39-
--md-primary-fg-color: var(--cc-ink);
40-
--md-accent-fg-color: var(--cc-brand-light);
41-
--md-typeset-a-color: var(--cc-brand-light);
70+
/* Page frame ---------------------------------------------------------------- */
71+
.sumi-header-inner,
72+
.sumi-shell,
73+
.sumi-footer-inner {
74+
max-width: var(--cc-page-w);
4275
}
4376

44-
[data-md-color-scheme="default"] {
45-
--md-typeset-a-color: var(--cc-link);
46-
/* A light header in the light scheme, Ink in the dark one, so the header
47-
answers the theme toggle like the rest of the page. */
48-
--md-primary-fg-color: #ffffff;
49-
--md-primary-fg-color--light: #f4f6f7;
50-
--md-primary-fg-color--dark: #eef2f4;
51-
--md-primary-bg-color: var(--cc-ink);
52-
--md-primary-bg-color--light: #4f6270;
77+
.sumi-shell {
78+
column-gap: 32px;
5379
}
5480

55-
[data-md-color-scheme="default"] .md-header {
56-
box-shadow: inset 0 -1px 0 #dce3e8;
81+
/* The footer is Ink on every page and in both schemes, so the docs and the
82+
landing page share one frame. */
83+
.sumi-footer {
84+
border-top: 0;
85+
background: #060d13;
5786
}
5887

59-
/* The theme's search field is a translucent black meant for a coloured
60-
header; on a white one it needs a solid tint instead. */
61-
[data-md-color-scheme="default"] .md-search__form {
62-
background-color: #eef2f4;
88+
.sumi-footer-inner {
89+
color: #8fa3b1;
6390
}
6491

65-
[data-md-color-scheme="default"] .md-search__form:hover {
66-
background-color: #e4e9ed;
92+
.sumi-footer a,
93+
.sumi-footer .sumi-icon-btn {
94+
color: #b9c7d1;
6795
}
6896

69-
/* A primary button is Signal Blue with Ink text: white on this blue is 3.1:1,
70-
under the 4.5:1 a button label needs; Ink on it is 5.9:1. */
71-
.md-typeset .md-button--primary {
72-
background-color: var(--cc-brand);
73-
border-color: var(--cc-brand);
74-
color: var(--cc-ink);
97+
.sumi-footer a:hover,
98+
.sumi-footer .sumi-icon-btn:hover {
99+
color: #ffffff;
100+
background: none;
75101
}
76102

77-
.md-typeset .md-button--primary:focus,
78-
.md-typeset .md-button--primary:hover {
79-
background-color: var(--cc-brand-light);
80-
border-color: var(--cc-brand-light);
81-
color: var(--cc-ink);
103+
/* Text the way the site has always set it: Instrument Sans without the
104+
stylistic sets Sumi turns on for its own face, at the same line height, and
105+
with no lead paragraph or rule above each section. */
106+
body {
107+
font-feature-settings: normal;
108+
}
109+
110+
.sumi-prose {
111+
line-height: 1.6;
112+
}
113+
114+
.sumi-prose h1 + p {
115+
font-size: inherit;
116+
line-height: inherit;
117+
color: inherit;
118+
}
119+
120+
.sumi-prose h2 {
121+
padding-top: 0;
122+
border-top: 0;
82123
}
83124

84125
/* Display face for page titles, section headings and the site name. Body text
85-
stays in the theme's text font. */
86-
.md-typeset h1,
87-
.md-typeset h2 {
126+
stays in the text font. */
127+
.sumi-prose h1,
128+
.sumi-prose h2,
129+
.sumi-brand-name {
88130
font-family: var(--cc-display-font);
89131
font-weight: 700;
90132
letter-spacing: -0.02em;
91133
}
92134

93-
/* The theme draws page titles in a light grey at weight 300; in the display
94-
face they read as headings only at full strength. */
95-
.md-typeset h1 {
96-
color: var(--md-default-fg-color);
135+
.sumi-brand-name {
136+
letter-spacing: -0.01em;
97137
}
98138

99-
.md-header__title {
100-
font-family: var(--cc-display-font);
101-
font-weight: 700;
102-
letter-spacing: -0.01em;
139+
/* Buttons -------------------------------------------------------------------
140+
A primary button is Signal Blue with Ink text: white on this blue is 3.1:1,
141+
under the 4.5:1 a button label needs; Ink on it is 5.9:1. */
142+
.sumi-prose .md-button--primary,
143+
.sumi-btn--primary {
144+
background-color: var(--cc-brand);
145+
border-color: var(--cc-brand);
146+
color: var(--cc-ink);
147+
}
148+
149+
.sumi-prose .md-button--primary:focus,
150+
.sumi-prose .md-button--primary:hover,
151+
.sumi-btn--primary:hover {
152+
background-color: var(--cc-brand-light);
153+
border-color: var(--cc-brand-light);
154+
color: var(--cc-ink);
103155
}
104156

105-
/* Feature grid: uses Material's card grid, tightened up a little. */
106-
.md-typeset .grid.cards > ul > li {
107-
border-radius: 0.4rem;
157+
/* Feature grid: the card hover picks up the brand colour. */
158+
.sumi-prose .grid.cards > ul > li,
159+
.sumi-prose ul.sumi-cards > li {
108160
transition: border-color 125ms, box-shadow 125ms;
109161
}
110162

111-
.md-typeset .grid.cards > ul > li:hover {
163+
.sumi-prose .grid.cards > ul > li:hover,
164+
.sumi-prose ul.sumi-cards > li:hover {
112165
border-color: var(--cc-brand);
113166
box-shadow: 0 0 0 1px var(--cc-brand);
114167
}
115168

116-
.md-typeset .grid.cards > ul > li > hr {
117-
margin: 0.6rem 0;
118-
}
119-
120169
/* Tables -------------------------------------------------------------------
121170
Cells align to the top so short values line up with a wrapped message. */
122-
.md-typeset table:not([class]) td,
123-
.md-typeset table:not([class]) th {
171+
.sumi-prose table:not([class]) td,
172+
.sumi-prose table:not([class]) th {
124173
vertical-align: top;
125174
}
126175

@@ -129,12 +178,6 @@
129178
break across two lines even on a wide screen. Other tables hold long regexes
130179
and allow-lists that must stay wrappable, hence the wrapper class rather
131180
than a rule for every table. */
132-
.md-typeset .rules-index td code {
181+
.sumi-prose .rules-index td code {
133182
white-space: nowrap;
134183
}
135-
136-
/* Sidebar section headings ("Getting started", "Reference", ...) */
137-
.md-nav__item--section > .md-nav__link {
138-
font-weight: 700;
139-
color: var(--md-default-fg-color);
140-
}

‎docs/assets/social.png‎

37 KB
Loading

docs/blog/posts/ai-native-commit-check.md renamed to docs/blog/posts/2026-06-21-ai-native-json-output-and-a-python-api.md

File renamed without changes.

docs/blog/posts/configuring-commit-check.md renamed to docs/blog/posts/2026-06-21-from-zero-config-to-org-wide-policy.md

File renamed without changes.

docs/blog/posts/introducing-commit-check.md renamed to docs/blog/posts/2026-06-21-one-policy-file-for-your-git-history.md

File renamed without changes.

docs/blog/posts/ai-attribution-governance.md renamed to docs/blog/posts/2026-07-06-ai-attribution-governance-enforcing-ai-disclosure-policies-at-the-ci-level.md

File renamed without changes.
File renamed without changes.

docs/blog/posts/no-llm-co-authors.md renamed to docs/blog/posts/2026-10-24-no-llm-co-authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ day.
128128

129129
If your project's AI policy says something different, such as "disclose it
130130
with `Assisted-by:`" or "no AI trailers at all",
131-
[this earlier post](ai-commit-attribution-policy.md) shows the setting for
131+
[this earlier post](2026-10-11-ai-commit-attribution-policy.md) shows the setting for
132132
each.

0 commit comments

Comments
 (0)