Docutils components¶
Registry-aware reference for every docutils component django-docutils
ships, generated by
sphinx-autodoc-docutils.
Each entry surfaces the component’s registry metadata — a transform’s
default_priority, the writer’s resolved translator class, a role’s
content support — and registers a cross-reference target in the
docutils domain, so prose anywhere in these docs can link straight
to a component: DjangoDocutilsWriter,
CodeTransform.
django-docutils registers nothing with Sphinx itself (no builders, domains, or config values) — it is a Django-side docutils consumer — so the docutils component family below is the complete inventory.
Writer¶
Full API: lib.writers.
-
django_docutils.lib.writers.DjangoDocutilsWriter¶django_docutils.lib.writers.DjangoDocutilsWriter¶
DjangoDocutils’s hand-crafted docutils’ writer.
- Python path:
- Supported formats:
html5,xhtml,html- Translator class:
- Config section:
html5 writer- Transforms:
Messages,FilterMessages,StripClassesAndElements,Admonitions
Translator¶
The translator’s Overrides fact lists only the visit/depart handlers
the class defines itself — the customizations layered on docutils’
HTML5 translator.
Full API: lib.writers.
-
django_docutils.lib.writers.DjangoDocutilsHTMLTranslator¶django_docutils.lib.writers.DjangoDocutilsHTMLTranslator¶
Django Docutils touchups to docutil’s HTML renderer.
- Python path:
- Base class:
HTMLTranslator- Overrides:
depart_icon,visit_docinfo,visit_icon,visit_reference,visit_table,visit_title
Transforms¶
Full API: lib.roles.transforms.code, lib.roles.transforms.toc, and lib.sanitize.
-
django_docutils.lib.transforms.code.CodeTransform¶django_docutils.lib.transforms.code.CodeTransform¶
Run over unparsed literals and try to guess language + highlight.
- Python path:
- Default priority:
120
-
django_docutils.lib.transforms.toc.Contents¶django_docutils.lib.transforms.toc.Contents¶
Helpers for rendering docutils table of contents from document tree.
- Python path:
- Default priority:
720
Directives¶
Registered under the name configured in DJANGO_DOCUTILS_LIB_RST
(code-block by default, with sourcecode as a common alias) via
django_docutils.lib.directives.code.register_pygments_directive(). Full API: lib.directives.code.
Roles¶
Role names shown here derive from the callable names; the names
actually registered with docutils come from the roles mapping in
DJANGO_DOCUTILS_LIB_RST (for example gh for github).
Full API: lib.roles.