Repository navigation
Commit 25057d9
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, dark**

**Landing page, whole page**

**Docs page**

**Docs page, dark**

**Blog index**

**Phone**

## 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
File tree
- .github/workflows
- docs
- assets
- blog/posts
- guides
- overrides
- stylesheets
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 38 | + | |
| 39 | + | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | | - | |
| 48 | + | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 17 | + | |
| 18 | + | |
24 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
25 | 48 | | |
26 | 49 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
33 | 68 | | |
34 | 69 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
42 | 75 | | |
43 | 76 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 77 | + | |
| 78 | + | |
53 | 79 | | |
54 | 80 | | |
55 | | - | |
56 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
57 | 86 | | |
58 | 87 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 88 | + | |
| 89 | + | |
63 | 90 | | |
64 | 91 | | |
65 | | - | |
66 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
67 | 95 | | |
68 | 96 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
75 | 101 | | |
76 | 102 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
82 | 123 | | |
83 | 124 | | |
84 | 125 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
88 | 130 | | |
89 | 131 | | |
90 | 132 | | |
91 | 133 | | |
92 | 134 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 135 | + | |
| 136 | + | |
97 | 137 | | |
98 | 138 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
103 | 155 | | |
104 | 156 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
108 | 160 | | |
109 | 161 | | |
110 | 162 | | |
111 | | - | |
| 163 | + | |
| 164 | + | |
112 | 165 | | |
113 | 166 | | |
114 | 167 | | |
115 | 168 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 169 | | |
121 | 170 | | |
122 | | - | |
123 | | - | |
| 171 | + | |
| 172 | + | |
124 | 173 | | |
125 | 174 | | |
126 | 175 | | |
| |||
129 | 178 | | |
130 | 179 | | |
131 | 180 | | |
132 | | - | |
| 181 | + | |
133 | 182 | | |
134 | 183 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| |||
Loading
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
0 commit comments