Repository navigation
doc: Add Sphinx extension for badges - #118
Draft
mschwan-phytec wants to merge 2 commits into
Draft
mschwan-phytec wants to merge 2 commits into
mschwan-phytec wants to merge 2 commits into
Conversation
mschwan-phytec
force-pushed
the
wip-doc-badges
branch
from
October 12, 2026 11:04
7aaecf2 to
58aa12c
Compare
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.
Add a local Sphinx extension "badges" that renders this metadata as
badges. It provides 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 new config value badges_release_notes_ref, a template
for the reference label containing the version, e.g. "release-{version}".
Style the badges in badges.css and load the extension and the stylesheet
from conf.py. Ignore the __pycache__ directories created when importing
the extension.
Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Use the new badges extension 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.
Lay out the definition list terms as a flex container in the theme
stylesheet, so that the type badge is aligned to the right of the option
name.
Signed-off-by: Martin Schwan <m.schwan@phytec.de>
mschwan-phytec
force-pushed
the
wip-doc-badges
branch
from
October 13, 2026 08:06
58aa12c to
1e28edb
Compare
mschwan-phytec
marked this pull request as draft
October 16, 2026 13:19
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.