mkdocs-pixel-lab 0.1.3__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/PKG-INFO +215 -15
  2. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/README.md +214 -14
  3. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/pyproject.toml +1 -1
  4. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/css/style.css +148 -51
  5. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/assets/icons/heading-link.svg +1 -0
  6. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/assets/icons/page-edit.svg +1 -0
  7. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/assets/icons/page-source.svg +3 -0
  8. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/assets/icons/repository.svg +3 -0
  9. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/assets/icons/search.svg +1 -0
  10. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/js/main.js +78 -24
  11. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/base.html +27 -6
  12. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/icons.html +26 -0
  13. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/mkdocs_theme.yml +13 -2
  14. mkdocs_pixel_lab-0.2.0/src/mkdocs_pixel_lab/page_source.html +16 -0
  15. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/site_navigation.html +3 -2
  16. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/mkdocs.yml +2 -0
  17. mkdocs_pixel_lab-0.2.0/tests/test_icons.py +209 -0
  18. mkdocs_pixel_lab-0.2.0/tests/test_permalinks.py +285 -0
  19. mkdocs_pixel_lab-0.2.0/tests/test_repository.py +125 -0
  20. mkdocs_pixel_lab-0.2.0/tests/test_site_navigation.py +839 -0
  21. mkdocs_pixel_lab-0.2.0/tests/test_source_links.py +196 -0
  22. mkdocs_pixel_lab-0.2.0/tests/test_theme.py +829 -0
  23. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-anchor-fill.svg +0 -4
  24. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-anchor.svg +0 -4
  25. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-chain-fill.svg +0 -3
  26. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-chain-shadow.svg +0 -3
  27. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-chain.svg +0 -3
  28. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-link-fill.svg +0 -3
  29. mkdocs_pixel_lab-0.1.3/src/mkdocs_pixel_lab/assets/icons/heading-link.svg +0 -3
  30. mkdocs_pixel_lab-0.1.3/tests/test_permalinks.py +0 -132
  31. mkdocs_pixel_lab-0.1.3/tests/test_site_navigation.py +0 -348
  32. mkdocs_pixel_lab-0.1.3/tests/test_theme.py +0 -385
  33. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/.gitignore +0 -0
  34. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/LICENSE +0 -0
  35. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/THIRD_PARTY_LICENSES.md +0 -0
  36. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/__init__.py +0 -0
  37. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/analytics.html +0 -0
  38. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/css/analytics.css +0 -0
  39. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/favicon.png +0 -0
  40. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/fonts/ibm-plex-mono-400.woff2 +0 -0
  41. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/fonts/ibm-plex-mono-600.woff2 +0 -0
  42. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/fonts/ibm-plex-mono-700.woff2 +0 -0
  43. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/fonts/inter-latin.woff2 +0 -0
  44. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/assets/js/analytics.js +0 -0
  45. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/git_lastmod.py +0 -0
  46. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/github_alerts.py +0 -0
  47. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/main.html +0 -0
  48. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/metadata.py +0 -0
  49. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/robots.py +0 -0
  50. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/src/mkdocs_pixel_lab/sitemap.xml +0 -0
  51. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/assets/pixel-lab-demo.mp4 +0 -0
  52. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/assets/pixel-lab-preview.svg +0 -0
  53. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/assets/site-navigation-hover.svg +0 -0
  54. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/guide/code.md +0 -0
  55. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/guide/media.md +0 -0
  56. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/guide/nested.md +0 -0
  57. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/guide/tabs.md +0 -0
  58. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/fixture_site/docs/index.md +0 -0
  59. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/snapshots/desktop.png +0 -0
  60. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/snapshots/mobile.png +0 -0
  61. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/test_analytics.py +0 -0
  62. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/test_git_lastmod.py +0 -0
  63. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/test_metadata.py +0 -0
  64. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/test_privacy.py +0 -0
  65. {mkdocs_pixel_lab-0.1.3 → mkdocs_pixel_lab-0.2.0}/tests/test_robots.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mkdocs-pixel-lab
3
- Version: 0.1.3
3
+ Version: 0.2.0
4
4
  Summary: A vibrant, accessible MkDocs documentation theme by Trained-by-Humans.
5
5
  Project-URL: Homepage, https://github.com/trained-by-humans/mkdocs-pixel-lab
6
6
  Project-URL: Documentation, https://github.com/trained-by-humans/mkdocs-pixel-lab#readme
@@ -91,14 +91,208 @@ plugins:
91
91
  - search
92
92
  ```
93
93
 
94
+ Toolbar actions appear in the order **Packages → Search → Repository**, with
95
+ optional actions omitted when not configured. At 850px and below, the toolbar
96
+ switches to icon-only buttons alongside the navigation toggle. Accessible
97
+ labels and tooltips remain available. The site
98
+ name stays on one line and truncates with an ellipsis only if space runs out.
99
+ This responsive layout works without JavaScript.
100
+
101
+ ### Repository button
102
+
103
+ Set MkDocs' `repo_url` to show a repository button in the toolbar:
104
+
105
+ ```yaml
106
+ repo_url: https://github.com/OWNER/REPO
107
+ ```
108
+
109
+ The button opens that URL directly and uses `repo_name` as its label (MkDocs
110
+ normally infers GitHub, GitLab, or Bitbucket), falling back to **Repository**.
111
+ It has a pixelated Git branch icon and the same hover/focus highlight, shadow,
112
+ and lift as the other toolbar buttons. On small screens, only the icon is shown,
113
+ with its accessible label and tooltip preserved. It works without JavaScript.
114
+
115
+ To show only the repository icon at every screen size, set `show_repo_name`
116
+ to `false` (the default is `true`):
117
+
118
+ ```yaml
119
+ theme:
120
+ name: pixel-lab
121
+ show_repo_name: false
122
+ ```
123
+
124
+ The link, custom icon, accessible label, and tooltip are unchanged. This setting
125
+ only hides the visible name; it does not enable or disable the repository button.
126
+
127
+ `show_repo` is enabled by default. Hide the button without affecting page
128
+ source/edit actions:
129
+
130
+ ```yaml
131
+ theme:
132
+ name: pixel-lab
133
+ show_repo: false
134
+ ```
135
+
136
+ The repository button is independent of `edit_uri`, `show_source`, and
137
+ `show_edit`. An absolute edit URL without `repo_url` does not enable it.
138
+
139
+ #### Custom repository icon
140
+
141
+ Customize the icon with `theme.icon.repo`, using Material's configuration
142
+ structure:
143
+
144
+ ```yaml
145
+ theme:
146
+ name: pixel-lab
147
+ icon:
148
+ repo: assets/icons/my-repo.svg
149
+ ```
150
+
151
+ Place this file at `docs/assets/icons/my-repo.svg`. Paths are relative to
152
+ `docs_dir` and resolved correctly on nested pages. Full HTTPS URLs and raster
153
+ images such as PNG also work. Pixel Lab uses image paths, not Material's bundled
154
+ icon names (such as `fontawesome/brands/github`).
155
+
156
+ Custom artwork preserves its original colors and fits in the same 14×14 slot,
157
+ without an extra border, background, or shadow. Button hover, keyboard focus,
158
+ and mobile behavior remain unchanged. Omit `icon.repo` or set it to `null`
159
+ to keep the theme-colored pixelated Git branch icon.
160
+
161
+ ### Custom UI icons
162
+
163
+ Toolbar and page-action icons share the `theme.icon` settings:
164
+
165
+ ```yaml
166
+ theme:
167
+ name: pixel-lab
168
+ icon:
169
+ repo: assets/icons/repo.svg
170
+ search: assets/icons/search.svg
171
+ menu: assets/icons/menu.svg
172
+ close: assets/icons/close.svg
173
+ sites: assets/icons/packages.svg
174
+ dropdown: assets/icons/chevron.svg
175
+ view: assets/icons/source.svg
176
+ edit: assets/icons/edit.svg
177
+ ```
178
+
179
+ All values are image paths relative to `docs_dir` or image URLs, not Material
180
+ icon-library names. SVG is recommended; PNG and other browser-supported image
181
+ formats also work. Omit any key, or set it to `null`, to keep its current default.
182
+ Icons do not enable features: `show_repo`, `show_source`, `show_edit`, and site
183
+ navigation settings still control availability.
184
+
185
+ | Key | Control |
186
+ | --- | --- |
187
+ | `repo` | Repository toolbar button |
188
+ | `search` | Search toolbar button |
189
+ | `menu` / `close` | Open / close the mobile navigation drawer |
190
+ | `sites` | Packages/site-navigation toolbar button |
191
+ | `dropdown` | Its dropdown arrow; still hidden on compact screens |
192
+ | `view` / `edit` | View source / Edit this page beside the main title |
193
+
194
+ Toolbar images keep their original colors and fit the existing 14×14 slots.
195
+ Page source and edit images are **alpha masks**: transparent areas
196
+ stay empty, and opaque areas receive the theme's foreground and copied hover
197
+ shadow. Use transparent artwork; an opaque white background becomes a solid
198
+ square. Remote mask images must allow cross-origin loading (CORS).
199
+
200
+ Custom page-action icons use a black silhouette and accent-dark hover/focus
201
+ shadow. Custom icons work without JavaScript. Heading permalinks use a single
202
+ built-in icon or the symbol supplied through [`toc`](#heading-links-and-keyboard-access),
203
+ not `theme.icon`.
204
+
205
+ Dropdown item artwork continues to use each item's `icon` and `icon_hover`
206
+ under `extra.site_navigation`; these settings do not change item icons, active
207
+ navigation markers, or the site-name/TM branding.
208
+
209
+ ### Page source
210
+
211
+ GitHub-backed sites show a pixelated **View source** icon immediately after the
212
+ main page title, with no box or background. Like heading anchors, it scales
213
+ with the title and reveals an accent-dark shadow on hover or keyboard focus.
214
+ The icon has an accessible label and hover tooltip. Set MkDocs'
215
+ repository URL and the branch/directory containing your Markdown files:
216
+
217
+ ```yaml
218
+ repo_url: https://github.com/OWNER/REPO
219
+ edit_uri: edit/main/docs/
220
+ ```
221
+
222
+ For `docs/guide/setup.md`, the link opens GitHub's `blob/main/docs/guide/setup.md`
223
+ file view. Set the branch and directory explicitly; MkDocs' GitHub default is
224
+ `edit/master/docs/`. The theme converts the resolved GitHub editor URL to its
225
+ file view for View source, while the Edit this page icon keeps the editor URL.
226
+
227
+ The link is enabled by default when available. Hide it with:
228
+
229
+ ```yaml
230
+ theme:
231
+ name: pixel-lab
232
+ show_source: false
233
+ ```
234
+
235
+ The theme uses MkDocs' `page.edit_url`, honoring `edit_uri_template` and source
236
+ mappings provided by generators. No plugin, Git checkout, or GitHub API request
237
+ is needed. The link is present in built HTML and remains usable with JavaScript
238
+ disabled; the theme's script appends it to the authored H1 without changing
239
+ the heading's text or ID. Generated pages without a source mapping have no
240
+ source link. Set `edit_uri: ""` to disable source links entirely (also remove
241
+ `edit_uri_template` if configured). File-view URLs are inferred only for
242
+ standard `github.com` URLs; other hosts do not display a source link.
243
+
244
+ #### Edit action
245
+
246
+ Like MkDocs' built-in themes, Pixel Lab shows an edit action whenever MkDocs
247
+ provides `page.edit_url`. A pixelated pen-nib icon appears beside the
248
+ source icon; no opt-in theme setting is required:
249
+
250
+ ```yaml
251
+ repo_url: https://github.com/OWNER/REPO
252
+ edit_uri: edit/main/docs/
253
+ theme:
254
+ name: pixel-lab
255
+ ```
256
+
257
+ `show_edit` is enabled by default and independent of `show_source`. Hide only
258
+ the edit icon with:
259
+
260
+ ```yaml
261
+ theme:
262
+ name: pixel-lab
263
+ show_edit: false
264
+ ```
265
+
266
+ To disable MkDocs' edit URLs instead, set `edit_uri: ""` and remove any
267
+ `edit_uri_template`. This also removes the inferred View source link.
268
+
269
+ The edit icon uses the same title-relative sizing, transparent background, hover shadow,
270
+ and keyboard focus styling as the source icon. Its accessible label and tooltip
271
+ are **Edit this page**.
272
+
273
+ The edit link uses MkDocs' resolved `page.edit_url` unchanged, including
274
+ non-GitHub repositories, custom `edit_uri_template` URLs, and generator source
275
+ mappings. Use your provider's editor path (`edit/main/docs/` for GitHub), not a
276
+ file-view path such as `blob/main/docs/`, when enabling editing. Missing or
277
+ disabled edit URLs omit the icon. No additional plugin or API request is needed.
278
+
94
279
  ### Heading links and keyboard access
95
280
 
96
281
  Section headings (H2–H6) show a permalink icon after the title. H1 page titles
97
- keep their IDs without an icon.
282
+ keep their IDs without a heading-permalink icon; the optional source icon is
283
+ separate.
98
284
 
99
- Choose `chain` (the default filled chain icon), `link` (the original link
100
- icon), or `hash` (the `#` icon) with `theme.permalink_icon`.
101
- All three use heading-relative sizing.
285
+ Permalinks are generated by Python-Markdown's `toc` extension, not a MkDocs
286
+ plugin. Its settings are preserved: `permalink: false` (or omitting the option)
287
+ produces no links, `permalink: true` uses the theme's solid pixelated link icon,
288
+ and a custom string such as `permalink: "⚓"` displays that symbol as text.
289
+ `permalink_title`, `permalink_leading`, and heading ID settings remain under
290
+ `toc`'s control.
291
+
292
+ The built-in icon scales with the heading and uses a black silhouette with a
293
+ matching accent-dark shadow on hover or keyboard focus. It works without
294
+ JavaScript. There are no separate theme settings for permalink artwork or fill;
295
+ use `toc` to enable, disable, or customize heading links.
102
296
 
103
297
  The URL fragment follows the current section as you scroll, without adding
104
298
  browser-history entries. Enable visible heading permalinks with:
@@ -106,18 +300,20 @@ browser-history entries. Enable visible heading permalinks with:
106
300
  ```yaml
107
301
  theme:
108
302
  name: pixel-lab
109
- permalink_icon: chain # default; or link, hash
110
- permalink_fill_color: "var(--accent)" # light accent by default; transparent disables it
111
303
  markdown_extensions:
112
304
  - toc:
113
305
  permalink: true
114
306
  ```
115
307
 
116
- The chain's colored body uses `theme.permalink_fill_color` (the light accent by
117
- default); its openings remain transparent. The black outline stays visible,
118
- while the shadow appears in the dark accent only on hover or keyboard focus.
119
- The original `link` and `hash` icons keep their light-accent coloring and
120
- dark-accent hover; the chain's fill setting does not affect them.
308
+ For a custom symbol and tooltip, configure the extension directly:
309
+
310
+ ```yaml
311
+ markdown_extensions:
312
+ - toc:
313
+ permalink: "⚓"
314
+ permalink_title: "Link to this section"
315
+ permalink_leading: false
316
+ ```
121
317
 
122
318
  A skip-to-content link, visible focus styles, and labeled navigation regions
123
319
  support keyboard use. Escape closes the search panel or open navigation drawer
@@ -451,7 +647,7 @@ extra:
451
647
  url: https://github.com/trained-by-humans/ml-pipes/tree/main/packages/vision
452
648
  catalog:
453
649
  title: All Packages →
454
- url: https://ml-pipes.com/PACKAGES/
650
+ url: https://ml-pipes.com/packages/
455
651
  ```
456
652
 
457
653
  </details>
@@ -470,8 +666,12 @@ inline header hides and the footer links stack vertically.
470
666
  Set each item's optional `icon` to an SVG/PNG path relative to the documentation
471
667
  directory or an absolute URL. Missing icons use a themed pixel fallback; icons
472
668
  appear only in the dropdown. The catalog can also specify an icon. The dropdown
473
- works without a catalog and marks the configured active item. Use Tab or arrow
474
- keys to navigate, and Escape to close it. Clicking outside also closes it.
669
+ works without a catalog and marks the configured active item. Mouse hover previews
670
+ the menu; moving into it keeps the preview open, while leaving closes it. Click
671
+ the button to pin it open. A second mouse click returns to the hover preview;
672
+ touch and keyboard activation toggle it open or closed. Pinned Packages and
673
+ active Search take priority over the other button's hover preview.
674
+ Use Tab or arrow keys to navigate, and Escape to close it. Clicking outside also closes it.
475
675
  On small screens, the header buttons use icons while keeping accessible labels.
476
676
 
477
677
  Optionally set `icon_hover` to an animated image URL. It replaces the resting
@@ -61,14 +61,208 @@ plugins:
61
61
  - search
62
62
  ```
63
63
 
64
+ Toolbar actions appear in the order **Packages → Search → Repository**, with
65
+ optional actions omitted when not configured. At 850px and below, the toolbar
66
+ switches to icon-only buttons alongside the navigation toggle. Accessible
67
+ labels and tooltips remain available. The site
68
+ name stays on one line and truncates with an ellipsis only if space runs out.
69
+ This responsive layout works without JavaScript.
70
+
71
+ ### Repository button
72
+
73
+ Set MkDocs' `repo_url` to show a repository button in the toolbar:
74
+
75
+ ```yaml
76
+ repo_url: https://github.com/OWNER/REPO
77
+ ```
78
+
79
+ The button opens that URL directly and uses `repo_name` as its label (MkDocs
80
+ normally infers GitHub, GitLab, or Bitbucket), falling back to **Repository**.
81
+ It has a pixelated Git branch icon and the same hover/focus highlight, shadow,
82
+ and lift as the other toolbar buttons. On small screens, only the icon is shown,
83
+ with its accessible label and tooltip preserved. It works without JavaScript.
84
+
85
+ To show only the repository icon at every screen size, set `show_repo_name`
86
+ to `false` (the default is `true`):
87
+
88
+ ```yaml
89
+ theme:
90
+ name: pixel-lab
91
+ show_repo_name: false
92
+ ```
93
+
94
+ The link, custom icon, accessible label, and tooltip are unchanged. This setting
95
+ only hides the visible name; it does not enable or disable the repository button.
96
+
97
+ `show_repo` is enabled by default. Hide the button without affecting page
98
+ source/edit actions:
99
+
100
+ ```yaml
101
+ theme:
102
+ name: pixel-lab
103
+ show_repo: false
104
+ ```
105
+
106
+ The repository button is independent of `edit_uri`, `show_source`, and
107
+ `show_edit`. An absolute edit URL without `repo_url` does not enable it.
108
+
109
+ #### Custom repository icon
110
+
111
+ Customize the icon with `theme.icon.repo`, using Material's configuration
112
+ structure:
113
+
114
+ ```yaml
115
+ theme:
116
+ name: pixel-lab
117
+ icon:
118
+ repo: assets/icons/my-repo.svg
119
+ ```
120
+
121
+ Place this file at `docs/assets/icons/my-repo.svg`. Paths are relative to
122
+ `docs_dir` and resolved correctly on nested pages. Full HTTPS URLs and raster
123
+ images such as PNG also work. Pixel Lab uses image paths, not Material's bundled
124
+ icon names (such as `fontawesome/brands/github`).
125
+
126
+ Custom artwork preserves its original colors and fits in the same 14×14 slot,
127
+ without an extra border, background, or shadow. Button hover, keyboard focus,
128
+ and mobile behavior remain unchanged. Omit `icon.repo` or set it to `null`
129
+ to keep the theme-colored pixelated Git branch icon.
130
+
131
+ ### Custom UI icons
132
+
133
+ Toolbar and page-action icons share the `theme.icon` settings:
134
+
135
+ ```yaml
136
+ theme:
137
+ name: pixel-lab
138
+ icon:
139
+ repo: assets/icons/repo.svg
140
+ search: assets/icons/search.svg
141
+ menu: assets/icons/menu.svg
142
+ close: assets/icons/close.svg
143
+ sites: assets/icons/packages.svg
144
+ dropdown: assets/icons/chevron.svg
145
+ view: assets/icons/source.svg
146
+ edit: assets/icons/edit.svg
147
+ ```
148
+
149
+ All values are image paths relative to `docs_dir` or image URLs, not Material
150
+ icon-library names. SVG is recommended; PNG and other browser-supported image
151
+ formats also work. Omit any key, or set it to `null`, to keep its current default.
152
+ Icons do not enable features: `show_repo`, `show_source`, `show_edit`, and site
153
+ navigation settings still control availability.
154
+
155
+ | Key | Control |
156
+ | --- | --- |
157
+ | `repo` | Repository toolbar button |
158
+ | `search` | Search toolbar button |
159
+ | `menu` / `close` | Open / close the mobile navigation drawer |
160
+ | `sites` | Packages/site-navigation toolbar button |
161
+ | `dropdown` | Its dropdown arrow; still hidden on compact screens |
162
+ | `view` / `edit` | View source / Edit this page beside the main title |
163
+
164
+ Toolbar images keep their original colors and fit the existing 14×14 slots.
165
+ Page source and edit images are **alpha masks**: transparent areas
166
+ stay empty, and opaque areas receive the theme's foreground and copied hover
167
+ shadow. Use transparent artwork; an opaque white background becomes a solid
168
+ square. Remote mask images must allow cross-origin loading (CORS).
169
+
170
+ Custom page-action icons use a black silhouette and accent-dark hover/focus
171
+ shadow. Custom icons work without JavaScript. Heading permalinks use a single
172
+ built-in icon or the symbol supplied through [`toc`](#heading-links-and-keyboard-access),
173
+ not `theme.icon`.
174
+
175
+ Dropdown item artwork continues to use each item's `icon` and `icon_hover`
176
+ under `extra.site_navigation`; these settings do not change item icons, active
177
+ navigation markers, or the site-name/TM branding.
178
+
179
+ ### Page source
180
+
181
+ GitHub-backed sites show a pixelated **View source** icon immediately after the
182
+ main page title, with no box or background. Like heading anchors, it scales
183
+ with the title and reveals an accent-dark shadow on hover or keyboard focus.
184
+ The icon has an accessible label and hover tooltip. Set MkDocs'
185
+ repository URL and the branch/directory containing your Markdown files:
186
+
187
+ ```yaml
188
+ repo_url: https://github.com/OWNER/REPO
189
+ edit_uri: edit/main/docs/
190
+ ```
191
+
192
+ For `docs/guide/setup.md`, the link opens GitHub's `blob/main/docs/guide/setup.md`
193
+ file view. Set the branch and directory explicitly; MkDocs' GitHub default is
194
+ `edit/master/docs/`. The theme converts the resolved GitHub editor URL to its
195
+ file view for View source, while the Edit this page icon keeps the editor URL.
196
+
197
+ The link is enabled by default when available. Hide it with:
198
+
199
+ ```yaml
200
+ theme:
201
+ name: pixel-lab
202
+ show_source: false
203
+ ```
204
+
205
+ The theme uses MkDocs' `page.edit_url`, honoring `edit_uri_template` and source
206
+ mappings provided by generators. No plugin, Git checkout, or GitHub API request
207
+ is needed. The link is present in built HTML and remains usable with JavaScript
208
+ disabled; the theme's script appends it to the authored H1 without changing
209
+ the heading's text or ID. Generated pages without a source mapping have no
210
+ source link. Set `edit_uri: ""` to disable source links entirely (also remove
211
+ `edit_uri_template` if configured). File-view URLs are inferred only for
212
+ standard `github.com` URLs; other hosts do not display a source link.
213
+
214
+ #### Edit action
215
+
216
+ Like MkDocs' built-in themes, Pixel Lab shows an edit action whenever MkDocs
217
+ provides `page.edit_url`. A pixelated pen-nib icon appears beside the
218
+ source icon; no opt-in theme setting is required:
219
+
220
+ ```yaml
221
+ repo_url: https://github.com/OWNER/REPO
222
+ edit_uri: edit/main/docs/
223
+ theme:
224
+ name: pixel-lab
225
+ ```
226
+
227
+ `show_edit` is enabled by default and independent of `show_source`. Hide only
228
+ the edit icon with:
229
+
230
+ ```yaml
231
+ theme:
232
+ name: pixel-lab
233
+ show_edit: false
234
+ ```
235
+
236
+ To disable MkDocs' edit URLs instead, set `edit_uri: ""` and remove any
237
+ `edit_uri_template`. This also removes the inferred View source link.
238
+
239
+ The edit icon uses the same title-relative sizing, transparent background, hover shadow,
240
+ and keyboard focus styling as the source icon. Its accessible label and tooltip
241
+ are **Edit this page**.
242
+
243
+ The edit link uses MkDocs' resolved `page.edit_url` unchanged, including
244
+ non-GitHub repositories, custom `edit_uri_template` URLs, and generator source
245
+ mappings. Use your provider's editor path (`edit/main/docs/` for GitHub), not a
246
+ file-view path such as `blob/main/docs/`, when enabling editing. Missing or
247
+ disabled edit URLs omit the icon. No additional plugin or API request is needed.
248
+
64
249
  ### Heading links and keyboard access
65
250
 
66
251
  Section headings (H2–H6) show a permalink icon after the title. H1 page titles
67
- keep their IDs without an icon.
252
+ keep their IDs without a heading-permalink icon; the optional source icon is
253
+ separate.
68
254
 
69
- Choose `chain` (the default filled chain icon), `link` (the original link
70
- icon), or `hash` (the `#` icon) with `theme.permalink_icon`.
71
- All three use heading-relative sizing.
255
+ Permalinks are generated by Python-Markdown's `toc` extension, not a MkDocs
256
+ plugin. Its settings are preserved: `permalink: false` (or omitting the option)
257
+ produces no links, `permalink: true` uses the theme's solid pixelated link icon,
258
+ and a custom string such as `permalink: "⚓"` displays that symbol as text.
259
+ `permalink_title`, `permalink_leading`, and heading ID settings remain under
260
+ `toc`'s control.
261
+
262
+ The built-in icon scales with the heading and uses a black silhouette with a
263
+ matching accent-dark shadow on hover or keyboard focus. It works without
264
+ JavaScript. There are no separate theme settings for permalink artwork or fill;
265
+ use `toc` to enable, disable, or customize heading links.
72
266
 
73
267
  The URL fragment follows the current section as you scroll, without adding
74
268
  browser-history entries. Enable visible heading permalinks with:
@@ -76,18 +270,20 @@ browser-history entries. Enable visible heading permalinks with:
76
270
  ```yaml
77
271
  theme:
78
272
  name: pixel-lab
79
- permalink_icon: chain # default; or link, hash
80
- permalink_fill_color: "var(--accent)" # light accent by default; transparent disables it
81
273
  markdown_extensions:
82
274
  - toc:
83
275
  permalink: true
84
276
  ```
85
277
 
86
- The chain's colored body uses `theme.permalink_fill_color` (the light accent by
87
- default); its openings remain transparent. The black outline stays visible,
88
- while the shadow appears in the dark accent only on hover or keyboard focus.
89
- The original `link` and `hash` icons keep their light-accent coloring and
90
- dark-accent hover; the chain's fill setting does not affect them.
278
+ For a custom symbol and tooltip, configure the extension directly:
279
+
280
+ ```yaml
281
+ markdown_extensions:
282
+ - toc:
283
+ permalink: "⚓"
284
+ permalink_title: "Link to this section"
285
+ permalink_leading: false
286
+ ```
91
287
 
92
288
  A skip-to-content link, visible focus styles, and labeled navigation regions
93
289
  support keyboard use. Escape closes the search panel or open navigation drawer
@@ -421,7 +617,7 @@ extra:
421
617
  url: https://github.com/trained-by-humans/ml-pipes/tree/main/packages/vision
422
618
  catalog:
423
619
  title: All Packages →
424
- url: https://ml-pipes.com/PACKAGES/
620
+ url: https://ml-pipes.com/packages/
425
621
  ```
426
622
 
427
623
  </details>
@@ -440,8 +636,12 @@ inline header hides and the footer links stack vertically.
440
636
  Set each item's optional `icon` to an SVG/PNG path relative to the documentation
441
637
  directory or an absolute URL. Missing icons use a themed pixel fallback; icons
442
638
  appear only in the dropdown. The catalog can also specify an icon. The dropdown
443
- works without a catalog and marks the configured active item. Use Tab or arrow
444
- keys to navigate, and Escape to close it. Clicking outside also closes it.
639
+ works without a catalog and marks the configured active item. Mouse hover previews
640
+ the menu; moving into it keeps the preview open, while leaving closes it. Click
641
+ the button to pin it open. A second mouse click returns to the hover preview;
642
+ touch and keyboard activation toggle it open or closed. Pinned Packages and
643
+ active Search take priority over the other button's hover preview.
644
+ Use Tab or arrow keys to navigate, and Escape to close it. Clicking outside also closes it.
445
645
  On small screens, the header buttons use icons while keeping accessible labels.
446
646
 
447
647
  Optionally set `icon_hover` to an animated image URL. It replaces the resting
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mkdocs-pixel-lab"
7
- version = "0.1.3"
7
+ version = "0.2.0"
8
8
  description = "A vibrant, accessible MkDocs documentation theme by Trained-by-Humans."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"