Skip to content

doc: Use sphinx-phytec-theme and its badges extension - #118

Open
mschwan-phytec wants to merge 3 commits into
mainfrom
wip-doc-badges
Open

mschwan-phytec wants to merge 3 commits into
mainfrom
wip-doc-badges

Conversation

@mschwan-phytec

Copy link
Copy Markdown
Collaborator

Add a local Sphinx extension that allows placing badges for the data type, requirement state and when the functionality got added. The "since" badges automatically create links to the changelog.

@mschwan-phytec
mschwan-phytec force-pushed the wip-doc-badges branch 2 times, most recently from 58aa12c to 1e28edb Compare October 13, 2026 08:06
@mschwan-phytec
mschwan-phytec marked this pull request as draft October 16, 2026 13:19
The layout configuration reference describes the type, state and
release of each option as plain text. This is hard to scan and has to
be repeated by hand for every option.

Use the PHYTEC Sphinx theme from sphinx-phytec-theme instead of
sphinx_rtd_theme with a local copy of the stylesheet. The theme also
provides the "badges" extension with the roles :badge-type:,
:badge-state:, :badge-since: and :badge:. The since badge links to the
release notes. The link target is built from the config value
badges_release_notes_ref, a template for the reference label containing
the version, e.g. "release-{version}".

Keep the partup specific logo, favicon and the Read the Docs flyout
fixups. Install the theme from the tagged release in the documentation
requirements and list it as a documentation dependency.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Use the badges extension of sphinx-phytec-theme to show the metadata of
each option in the layout configuration reference instead of plain text:

  - Replace the "(type)" suffixes with type badges. Options accepting
    multiple types get one badge per type.
  - Add state badges for the options whose state is fixed.
  - Replace the "Available since" paragraphs with since badges linking
    to the release notes.

Clean entries must contain an offset and a size, so change "should" to
"must" in the description of the clean section accordingly.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
The styling of the Read the Docs flyout is part of the PHYTEC Sphinx
theme now, so it does not have to be kept in partup anymore.

Drop rtd-fixups.css and its entry in conf.py.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
@mschwan-phytec mschwan-phytec changed the title doc: Add Sphinx extension for badges doc: Use sphinx-phytec-theme and its badges extension Oct 20, 2026
@mschwan-phytec
mschwan-phytec marked this pull request as ready for review October 20, 2026 09:25

This branch has not been deployed

No deployments
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