Skip to content

Commit afeaa3e

Browse files
flaportclaude
andauthored
Simplify docs config with theme mixins (#56)
## Summary - Delete `docs/hooks.py` — all preprocessing logic (matplotlib rcParams, MyST admonition conversion, cross-ref auto-linking) is now handled by shadcn theme mixins - Remove all `markdown_extensions` and `mkdocstrings` options boilerplate from `mkdocs.yml` — theme provides sensible defaults - Add `crossref_modules` and `crossref_aliases` to theme config for project-specific cross-ref resolution Net result: `mkdocs.yml` goes from 90 to 56 lines, `hooks.py` (112 lines) is deleted entirely. Depends on gdsfactory/mkdocs-shadcn@13d85fc. ## Test plan - [ ] `just docs` builds without errors - [ ] Syntax highlighting works on notebook pages - [ ] Cross-refs resolve on API page - [ ] KaTeX math renders on algorithm page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 340575a commit afeaa3e

2 files changed

Lines changed: 7 additions & 153 deletions

File tree

docs/hooks.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

mkdocs.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ theme:
1111
logo: assets/logo-small.svg
1212
favicon: assets/logo-small.ico
1313
katex_options: {}
14+
crossref_modules:
15+
- meow
16+
- meow.eme
17+
- meow.fde
18+
crossref_aliases:
19+
compute_modes: meow.compute_modes_tidy3d
20+
compute_s_matrix: meow.compute_s_matrix_sax
1421

1522
nav:
1623
- home: index.md
@@ -25,9 +32,6 @@ nav:
2532
- api: api.md
2633
- changelog: changelog.md
2734

28-
hooks:
29-
- docs/hooks.py
30-
3135
plugins:
3236
- search
3337
- autorefs
@@ -49,41 +53,3 @@ plugins:
4953
- https://scipy.github.io/devdocs/objects.inv
5054
- https://typing.readthedocs.io/en/latest/objects.inv
5155
- https://www.mkdocs.org/objects.inv
52-
options:
53-
allow_inspection: true
54-
docstring_style: google
55-
docstring_options:
56-
ignore_init_summary: true
57-
docstring_section_style: table # table | list | spacy
58-
filters: ["!^_"]
59-
heading_level: 1
60-
inherited_members: true
61-
merge_init_into_class: true
62-
separate_signature: true
63-
show_root_heading: true
64-
show_root_full_path: false
65-
show_signature_annotations: true
66-
show_source: true
67-
show_symbol_type_heading: true
68-
show_symbol_type_toc: true
69-
signature_crossrefs: true
70-
summary: true
71-
72-
markdown_extensions:
73-
- attr_list
74-
- toc:
75-
permalink: true
76-
- pymdownx.highlight:
77-
anchor_linenums: true
78-
line_spans: __span
79-
pygments_lang_class: true
80-
- pymdownx.inlinehilite
81-
- pymdownx.snippets
82-
- pymdownx.magiclink
83-
- pymdownx.tabbed:
84-
alternate_style: true
85-
- admonition
86-
- pymdownx.details
87-
- pymdownx.arithmatex:
88-
generic: true
89-
- pymdownx.superfences

0 commit comments

Comments
 (0)