Commit c9ae6de
feat: add custom user-provided markdown lessons
Implement support for user-provided markdown lessons loaded from custom directories.
Users can now create personalized typing practice content with preserved formatting.
Core Features:
- Load lessons from ~/.config/typer-cli/custom/ and ./custom/
- YAML front matter support for metadata (title, description)
- Manual YAML parser (zero new dependencies)
- Automatic title deduplication with (1), (2) suffix
- Graceful error handling with stderr warnings
- Empty state UI with helpful instructions
Implementation:
- New module: src/content/custom.rs (350+ lines)
- Custom category with Blue color scheme
- Preserved formatting (line breaks, spacing, indentation)
- Statistics tracking using lesson title as identifier
- File size limit (1MB) with validation
Testing:
- 11 new unit tests (146 total passing)
- Zero clippy warnings
- Full code formatting compliance
Documentation:
- Feature docs (requirements.md, design.md, tasks.md)
- User guide in README.md with examples
- Updated contributor docs and AI context
- Complete tasks checklist
Files Modified:
- New: src/content/custom.rs
- New: docs/features/custom-lessons/ (3 files)
- Modified: 10 existing files
- Updated: .gitignore (ignore /custom directory)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent a58ff89 commit c9ae6de
File tree
14 files changed
+1297
-12
lines changed- docs
- features/custom-lessons
- src
- content
- ui
14 files changed
+1297
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | | - | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | | - | |
| 171 | + | |
167 | 172 | | |
168 | | - | |
169 | | - | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
181 | 233 | | |
182 | 234 | | |
183 | 235 | | |
| |||
188 | 240 | | |
189 | 241 | | |
190 | 242 | | |
191 | | - | |
| 243 | + | |
192 | 244 | | |
193 | 245 | | |
194 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
213 | 227 | | |
214 | 228 | | |
215 | 229 | | |
| |||
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
286 | | - | |
| 300 | + | |
287 | 301 | | |
288 | | - | |
| 302 | + | |
289 | 303 | | |
290 | 304 | | |
291 | 305 | | |
| |||
297 | 311 | | |
298 | 312 | | |
299 | 313 | | |
| 314 | + | |
| 315 | + | |
300 | 316 | | |
301 | 317 | | |
302 | 318 | | |
| |||
312 | 328 | | |
313 | 329 | | |
314 | 330 | | |
| 331 | + | |
315 | 332 | | |
316 | 333 | | |
317 | 334 | | |
| |||
0 commit comments