Skip to content

Migrate documentation from MkDocs to Sphinx - #177

Open
tfcollins wants to merge 8 commits into
masterfrom
hal/doc-theme
Open

tfcollins wants to merge 8 commits into
masterfrom
hal/doc-theme

Conversation

@tfcollins

Copy link
Copy Markdown
Collaborator

Builds the toolbox documentation with Sphinx and the cosmic theme from
adi-doctools, matching
pyadi-iio. Pages stay in
Markdown and are parsed with MyST, so most content carried over unchanged.

Structure

CI/gen_doc/docs is now the Sphinx source directory.

  • Navigation moves from mkdocs.yml to toctrees, with generated
    sysobjects/index.md and hdlrefdesigns/index.md section pages.
  • The _pages/ Jinja indirection is dropped. It existed to inject the
    mkdocs hide: navigation front matter for the MATLAB build; that is now
    a CSS override selected by the MATLAB env var.
  • _templates/ is renamed _tmpl/ so it does not collide with Sphinx's
    own template lookup. Its templates emit MyST instead of mkdocs HTML.
  • stylesheets/ moves to _static/css/, and the unused
    sphinx-rtd-theme scaffolding under gen_doc/source/ is removed.

Content

Converted mkdocs-material syntax: !!! warning admonitions,
```mermaid fences, linenums="1" code blocks, and raw <img> tags.

Device interface pages use the theme's collapsible directive for
properties, replacing the hand-rolled button/JS/CSS implementation.

The HDL reference design diagrams are inlined with raw:: html rather
than served through <img>, which would have broken both the clickable
sub-blocks and the external stylesheet. gen_rd_svg.py now emits the
theme's CSS variables instead of mkdocs-material's.

Generated files

docs/sysobjects/, docs/hdlrefdesigns/, helptoc.xml, the
*_custom.svg diagrams, and rd_style.css are no longer tracked. The
committed copies had drifted — 8 of 17 device pages, 8 of 16 reference
designs, plus an output1.md that no source produces. make doc
regenerates them before every build.

MATLAB help browser

make doc_ml still works. MATLAB=ON enables the theme's standalone
option and adds _static/css/matlab.css to hide the theme chrome, and
helptoc.xml now points at Sphinx's flat page.html URLs rather than
mkdocs' page/index.html.

Notes

  • make -C CI/gen_doc doc builds clean from a fresh tree with no Sphinx
    warnings. Both doc and doc_ml targets were verified end to end.
  • Local verification used adi-doctools 0.4.45 from PyPI. CI installs the
    GitHub latest tarball as pyadi-iio does, so the doc.yml run on this
    PR is the first check against that build.
  • doc.yml moves to Python 3.11 and drops the now unnecessary
    apt install python3-numpy.
  • build.yml still calls make doc rather than doc_ml when packaging
    the toolbox. That is pre-existing behavior and left alone here.

tfcollins and others added 8 commits August 10, 2026 21:45
Build the toolbox documentation with Sphinx and the cosmic theme from
adi-doctools, matching pyadi-iio. Pages stay in Markdown and are parsed
with MyST.

- docs/ becomes the Sphinx source directory; navigation moves from
  mkdocs.yml to toctrees, and the _pages Jinja indirection is dropped
  since hiding the theme chrome for MATLAB is now a CSS override
- Convert mkdocs-material syntax: admonitions, mermaid fences, numbered
  code blocks, and raw <img> tags
- Replace the hand-rolled collapsible properties on device pages with
  the theme's collapsible directive
- Inline the reference design SVGs so their sub-blocks stay clickable,
  and restyle them with the theme's CSS variables
- Point helptoc.xml at Sphinx's page URLs so MATLAB's help browser
  keeps working
- Stop tracking generated pages and assets, several were stale
- Remove the unused sphinx-rtd-theme scaffolding under gen_doc/source

Claude-Session: https://claude.ai/code/session_01Bba3uKPPNjK8musGxR8vrf
GitHub runners no longer ship Python 3.9, which failed the job at the
setup-python step. Move to 3.11 and update the deprecated action
versions.
The errata-ai/Google style repository was renamed to vale-cli/Google, so
the releases API now answers with a 301. Without -L curl returned the
redirect body instead of the release JSON, no asset was downloaded, and
unzip failed.
The lint step pointed at a docs directory that does not exist, so Vale
read empty stdin and reported nothing. Point it at the Sphinx sources.
Vale was linting the Jinja templates under docs/_tmpl and the MATLAB
live script exports under docs/models, where its findings are noise, so
restrict it to the top level pages.

The accept list had 'ip usb' on a single line, which matched neither
term. Split it and add the technical vocabulary the pages use.
Listing these lowercase made Vale.Terms enforce that casing, flagging
'IP core' and 'USB'. Use case permissive patterns, matching how adc and
dac are already handled.
Accept both cases for decimator/interpolator (same pattern used for
ip/usb/iio), format MATLAB class paths as inline code so Vale treats
them as code rather than prose, and fix ordinal/quote-punctuation/
capitalization style errors in targeting.md and streaming.md.

Claude-Session: https://claude.ai/code/session_01TrDkpfceW2nazDddJsEz2F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant