API Reference¶
CSS classes¶
Class |
Element |
Purpose |
|---|---|---|
|
|
Managed autodoc shell |
|
|
Signature row shell |
|
|
Description/content shell |
|
|
Header split between left and right |
|
|
Signature text, custom disclosure, permalink |
|
|
Badge container and source link |
|
|
Compact signature row |
|
|
Managed permalink in the left layout |
|
|
Wrapper for badge group output |
|
|
Wrapper for the |
|
|
Wraps paragraphs, notes, examples |
|
|
Wraps field lists (Parameters, Returns) |
|
|
Wraps nested method/attribute entries |
|
|
Compatibility alias on content sections |
|
|
Compatibility alias on narrative sections |
|
|
Compatibility alias on parameter sections |
|
|
Compatibility alias on footer/member sections |
|
|
Disclosure wrapper for large sections |
|
|
Click target showing field count |
API reference¶
-
sphinx_ux_autodoc_layout.build_api_card_entry(*, profile_class, signature_children, content_children=(), badge_group=None, permalink=None, entry_classes=(), signature_classes=(), content_classes=())¶sphinx_ux_autodoc_layout.build_api_card_entry(*, profile_class, signature_children, content_children=(), badge_group=None, permalink=None, entry_classes=(), signature_classes=(), content_classes=())¶
Build a shared
gp-sphinx-api-*card entry for non-descconsumers.The header emits both desktop and mobile layout variants side-by-side so theme CSS can container-query between them just like the managed
desc_signaturepath does in_transforms. Header metadata (data-has-source,data-has-badges,data-badge-count,data-has-fold) is also added so styling can branch on facts the cascade can’t compute.Parameters (10)
- Parameters:
profile_class (
str) – Stable profile class such as"gp-sphinx-api-profile--fastmcp-tool".signature_children (
Sequence[nodes.Node]) – Children placed inside thegp-sphinx-api-signaturewrapper.content_children (
Sequence[nodes.Node]) – Children appended togp-sphinx-api-content.badge_group (
nodes.Node|None) – Shared badge group rendered insidegp-sphinx-api-badge-container.permalink (
api_permalink|None) – Explicit header permalink placed ingp-sphinx-api-layout-left.entry_classes (
tuple[str, ...]) – Extra CSS classes for the outergp-sphinx-api-entrywrapper.signature_classes (
tuple[str, ...]) – Extra classes for thegp-sphinx-api-signaturewrapper.content_classes (
tuple[str, ...]) – Extra classes for thegp-sphinx-api-contentwrapper.
- Returns:
Shared card entry tree using the stable
gp-sphinx-api-*contract.- Return type:
nodes.Element
-
sphinx_ux_autodoc_layout.build_api_summary_section(*children, classes=())¶sphinx_ux_autodoc_layout.build_api_summary_section(*children, classes=())¶
Wrap summary or index content in the shared
gp-sphinx-api-summaryregion.Examples
>>> from docutils import nodes >>> section = build_api_summary_section(nodes.paragraph("", "Summary")) >>> section.get("name") 'gp-sphinx-api-summary'
-
sphinx_ux_autodoc_layout.build_api_table_section(name, *children, classes=())¶sphinx_ux_autodoc_layout.build_api_table_section(name, *children, classes=())¶
Wrap one or more table-like body nodes in a shared API section.
-
sphinx_ux_autodoc_layout.build_api_facts_section(rows, *, classes=())¶sphinx_ux_autodoc_layout.build_api_facts_section(rows, *, classes=())¶
Render a shared
gp-sphinx-api-factssection from typed fact rows.
Copyable config snippet
extensions = [
"sphinx_ux_autodoc_layout",
]