Themes and extensions#
The Plone Documentation team learned the hard way that maintaining the design and features of documentation is a lot of work. To make all documentation maintainable, we use actively developed themes and extensions to build the documentation.
Themes#
When customizing the theme, we use Sphinx Book Theme, which in turn depends on PyData Sphinx Theme. See their documentation for features, tips, and tricks that you might want to include in your documentation.
We minimize the customizations of these themes as much as possible.
Extensions#
We use several MyST and Sphinx extensions to enhance the presentation of Plone documentation.
MyST#
attrs_blocksupports parsing of block attributes before certain block syntaxes.attrs_inlinesupports parsing of inline attributes before certain inline syntaxes.colon_fencesupports the use of three colons:::as delimiters to denote code fences, instead of three backticks```.deflistsupports definition lists.html_imagesupports the use of HTML<img>tags.linkifyidentifies "bare" web URLs and adds hyperlinks.strikethroughsupports the use of strikethrough markup.substitutionsupports the use of substitutions with Jinja2.
Sphinx#
myst_parserparses MyST, a rich and extensible flavour of Markdown for authoring documentation.sphinx-design, with a configuration name ofsphinx_design, adds grids, cards, icons, badges, buttons, tabs, and dropdowns.sphinx-examplesadds "example snippets" that allow you to show off source Markdown and the result of rendering it in Sphinx.sphinx-notfound-page, with a configuration name ofnotfound.extension, creates a custom 404 page and helps generate proper static resource links to render the page.sphinx-tippy, with a configuration name ofsphinx_tippy, provides hover tips in your documentation.sphinx.ext.autodocpulls in documentation from Python docstrings to generate reStructuredText which in turn gets parsed by Sphinx and rendered to the output format. It's used by plone.api.sphinx.ext.autosummarygenerates function/method/attribute summary lists. It's used by plone.api.sphinx.ext.graphvizallows you to embed Graphviz graphs in your documents.sphinx.ext.ifconfigincludes content based on configuration.sphinx.ext.intersphinxprovides linking between separate projects that use Sphinx for documentation.sphinx.ext.todoadds support for todo items.sphinx.ext.viewcodegenerates pages of source code modules and links between the source and the description. It's used by plone.api.sphinx_copybuttonadds a little "copy" button to the right of code blocks.sphinx_reredirectshandles redirects for moved pages.sphinx_sitemapgenerates multiversion and multilanguage sitemaps.org compliant sitemaps.sphinxcontrib.httpdomainprovides a Sphinx domain for describing HTTP APIs. It's used by Plone's REST API.sphinxcontrib.httpexampleenhancessphinxcontrib-httpdomainby generating RESTful HTTP API call examples for different tools from a single HTTP request example. Supported tools includecurl,wget,httpie, andpython-requests. It's used by Plone's REST API.sphinxcontrib.mermaidallows you to embed Mermaid graphs in your documents, including general flowcharts, sequence diagrams, and Gantt charts.sphinxcontrib.videoallows you to embed local videos as defined by the HTML5 standard.sphinxcontrib.youtubeallows you to embed remotely hosted videos from YouTube, Vimeo, or PeerTube.sphinxext.opengraphgenerates OpenGraph metadata.