Skip to content

docs: pydata-sphinx-theme instead of the ESP-IDF theme; API reference page (docs rework, stage 1) - #891

Merged
finger563 merged 1 commit into
mainfrom
feat/docs-pydata-theme
Nov 6, 2026
Merged

finger563 merged 1 commit into
mainfrom
feat/docs-pydata-theme

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Summary

First stage of the docs rework: the site moves from esp-docs' sphinx_idf_theme to pydata-sphinx-theme (the NumPy / pandas / Jupyter docs theme). esp-docs still runs Doxygen and provides the API directives; only the look and the navigation change.

  • No chip selector, no ESP-IDF version list, espp's logo and favicon. Both selectors were the old theme's (fed by Espressif's own version file); the Espressif logo was forced by esp-docs at extension load, so a small config-inited hook behind esp-docs' own replaces it. The logo is the esp-cpp organisation image with its background lifted; a proper SVG can drop in later.
  • The layout you get: a top bar with Getting Started, API Reference, Dev Boards, Web Apps and QEMU, the section navigation on the left (collapsible, and a panel of its own that scrolls under the wheel), the page outline and an "Edit on GitHub" button on the right, breadcrumbs, previous / next, light and dark modes following the system with a toggle, search with a keyboard shortcut, GitHub and Discord links.
  • Navigation restructured for it. The index had thirteen captioned toctrees, which this theme turns into a navbar that overflows into "More". A new api_reference page holds the capability groups (the captions become sidebar headings), and the index keeps a short top-level toctree plus a list of the groups.
  • Version switcher left for stage two: the theme's switcher takes a JSON file we host, which the versioned-publishing workflow (latest plus one entry per release/v* branch) will generate. The option is in conf_common.py, commented, ready for it.
  • Build environment: docutils<0.21 pinned in doc/requirements.txt (esp-docs' target-substitution extension imports a module docutils 0.21 removed; the theme would otherwise pull a newer docutils); the old theme's config values that esp-docs' LaTeX and html-zip extensions still read are registered by our setup(). doc/README.md gains the recipe for building locally without Docker.

Nothing about the published layout changes in this PR (still the site root); the workflow is untouched.

Test plan

  • Full local build (Doxygen + Sphinx) with the CI requirements; the warnings are the same families as before (Breathe duplicate declarations, a few signatures the C++ parser cannot read), none from the theme
  • Rendered in Chrome: index, section pages, a long API page; dark and light modes; the left panel scrolls under the wheel on its own; logo, favicon, GitHub and Discord links, edit button, search
  • CI docs workflow builds and publishes it

🤖 Generated with Claude Code

https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU

… page

First stage of the docs rework. esp-docs still runs Doxygen and provides
the API directives; the look and the navigation change.

- No chip selector and no ESP-IDF version list (both were the old theme's,
  the latter fed by Espressif's version file), espp's logo and favicon
  (the organisation image with its background lifted; esp-docs forces the
  Espressif logo at extension load, a config-inited hook behind its own
  replaces it). A top bar, the section navigation on the left as a panel
  of its own, the page outline and an edit button on the right,
  breadcrumbs, previous / next, light and dark modes, search, GitHub and
  Discord links.
- The index had thirteen captioned toctrees, which this theme turns into
  a navbar that overflows into "More". A new api_reference page holds the
  capability groups (the captions become sidebar headings); the index
  keeps a short top-level toctree and a list of the groups.
- The theme's version switcher is wired in the next stage (versioned
  publishing: latest plus one entry per release/v* branch); the option
  sits in conf_common.py, commented.
- docutils<0.21 pinned: esp-docs' target-substitution extension imports a
  module docutils 0.21 removed, and the theme would otherwise pull a newer
  docutils. The old theme's config values that esp-docs' LaTeX and
  html-zip extensions still read are registered by our setup(). doc/README
  gains the recipe for building locally without Docker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:13
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the documentation theme and navigation changes.

No open issues 🎉

What changed in this PR

This PR starts the documentation redesign by replacing the ESP-IDF theme with pydata-sphinx-theme, while retaining esp-docs for Doxygen and API integration. Publishing remains unchanged.

Changes:

  • Configure espp branding, navigation, sidebars, and light/dark theme support.
  • Move capability groups into a dedicated API Reference page and simplify top-level navigation.
  • Add theme dependencies, compatibility configuration, and native build instructions.
File Description
doc/​requirements.txt Add the new theme and pin docutils for esp-docs compatibility.
doc/​README.md Document local builds without Docker.
doc/​en/​index.rst Simplify navigation and link to API capability groups.
doc/​en/​api_reference.rst Collect component groups into a dedicated API landing page.
doc/​en/​_static/​espp.css Add horizontal overflow handling for signatures and diagrams.
doc/​conf_common.py Configure the theme, branding, navigation, and esp-docs compatibility hooks.

Review effort: Balanced

@finger563
finger563 merged commit 1755d63 into main Nov 6, 2026
13 checks passed
@finger563
finger563 deleted the feat/docs-pydata-theme branch November 6, 2026 17:23
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.

2 participants