# Technical advancements in Sphinx

**URL:** <https://community.panodata.org/t/technical-advancements-in-sphinx/278>\
**Category:** The workbench\
**Tags:** documentation\
**Created:** [May 24, 2023, 10:00pm UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278 "2023-05-24T22:00:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [May 24, 2023, 10:00pm UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/1 "2023-05-24T22:00:00Z")

</div>

## About

Coming from recent endeavors aiming to modernize different Sphinx documentation repositories we are maintaining, let me start by reporting about different advancements in the area of the [Sphinx documentation generator](https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)) and its ecosystem, which materialized in the recent years.

## Themes 🪟

### Furo theme

First of all, I would like to outline the excellent [Furo](https://pradyunsg.me/furo/) theme, which advertises itself as _a clean customisable Sphinx documentation theme_.

– [GitHub - pradyunsg/furo: A clean customizable documentation theme for Sphinx](https://github.com/pradyunsg/furo)

### Executable Books Project and Theme

Also, very massive advancements are coming from [The Executable Books Project](https://executablebooks.org/), around [Chris Sewell](https://github.com/chrisjsewell), [Chris Holdgraf](https://github.com/choldgraf), and contributors, with connections to [The Jupyter Project](https://jupyter.org/), see [Background and history](https://compass.executablebooks.org/en/latest/about/history.html) and [their team](https://compass.executablebooks.org/en/latest/team/).

– [GitHub - executablebooks/sphinx-book-theme: A clean book theme for scientific explanations and documentation with Sphinx](https://github.com/executablebooks/sphinx-book-theme)

### PyData Sphinx Theme

This is also a very capable theme, using Bootstrap.

– [GitHub - pydata/pydata-sphinx-theme: A clean, three-column Sphinx theme with Bootstrap for the PyData community](https://github.com/pydata/pydata-sphinx-theme)

## sphinx{design} ✨

Inspired by [Bootstrap](https://getbootstrap.com/), [Material Design](https://material.io), and [Material-UI](https://material-ui.com/) design frameworks, sphinx-design [[1]](#footnote-3545-1)

is a Sphinx extension for designing beautiful, screen-size responsive web-components. It brings in grid-, card-, dropdown-, tab-, badge-, and button-elements, supporting both [reStructuredText](https://en.wikipedia.org/wiki/ReStructuredText) and [MyST](https://myst-parser.readthedocs.io/).

– [https://sphinx-design.readthedocs.io/](https://sphinx-design.readthedocs.io/)  
– [GitHub - executablebooks/sphinx-design: A sphinx extension for designing beautiful, screen-size responsive web components.](https://github.com/executablebooks/sphinx-design)

### Example

The installation documentation page of Streamlink looks so sweet!

 ![image](https://community.panodata.org/uploads/default/original/1X/08c7c7df1d4b53d8d10452c981ac1895e4754764.png) ![image](https://community.panodata.org/uploads/default/original/1X/d89340eaa245b7f08ee7a649c5fc3d8091af517a.png) ![image](https://community.panodata.org/uploads/default/original/1X/e316b479ec7699b81dc69473107a8ac3228f3ea5.png)

– Via: [Installation - Streamlink 5.5.1 documentation](https://streamlink.github.io/install.html) – which also uses the Furo theme, by the way.

## MyST Markdown - Markedly Structured Text ✍

> [@](#):
>
> A Sphinx and Docutils extension to parse MyST, a rich and extensible flavour of Markdown for authoring technical and scientific documentation.

### The great dilemma

For a long time, the power of the [Sphinx documentation generator](https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)) was only available to people writing documentation in [reStructuredText](https://en.wikipedia.org/wiki/ReStructuredText). Because [Markdown](https://en.wikipedia.org/wiki/Markdown) gained significant popularity in recent years, the community was in a big dilemma, and I am sure there have been endless [Programming Language Wars](https://cs.wellesley.edu/~cs251/f16/assignments/antics/StefixHanenbergLanguageWars.pdf)-style discussions around using [reStructuredText](https://en.wikipedia.org/wiki/ReStructuredText) vs. [Markdown](https://en.wikipedia.org/wiki/Markdown) for documentation authoring.

This dilemma has come to an end with [MyST](https://myst-parser.readthedocs.io/) now, aiming to follow up on the success of [MySQL](https://en.wikipedia.org/wiki/MySQL) and [mypy](https://mypy.readthedocs.io/) – naming-wise.

### Enter MyST

> [@](#):
>
> [MyST](https://myst-parser.readthedocs.io/) is a strict superset of the [CommonMark syntax specification](https://spec.commonmark.org/). It adds features focussed on scientific and technical documentation authoring.
> 
> – [https://myst-parser.readthedocs.io/](https://myst-parser.readthedocs.io/)

Effectively, it brings Markdown to Sphinx in full swing – finally. 🌟

> [@](#):
>
> Roles and directives provide a way to extend the syntax of MyST in an unbound manner, by interpreting a chunk of text as a specific type of markup, according to its name.
> 
> Directives syntax is defined with triple-backticks and curly-brackets, effectively a Markdown code fence.
> 
> – [Roles and Directives](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html)
> 
> ##### Example
> 
> ![image](https://community.panodata.org/uploads/default/original/1X/d61bae27e7ce2ca04ab7ba78954153b885f2548e.png)

 ![image](https://community.panodata.org/uploads/default/original/1X/8092af5955d9c6285d183d6571087ef40832eea2.jpeg)

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 20, 2023, 8:40am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/2 "2023-07-20T08:40:25Z")

</div>

### Sphinx building blocks

A few more excellent software components in Sphinx.

- [https://sphinx-inline-tabs.readthedocs.io/](https://sphinx-inline-tabs.readthedocs.io/)
- [GitHub - mgaitan/sphinxcontrib-mermaid: Mermaid diagrams in yours sphinx powered docs](https://github.com/mgaitan/sphinxcontrib-mermaid)  
Demo: [https://sphinxcontrib-mermaid-demo.readthedocs.io/](https://sphinxcontrib-mermaid-demo.readthedocs.io/)
- A collection of Sphinx extensions by [Chris Sewell](https://github.com/chrisjsewell).  
[sphinx-extensions2 · GitHub](https://github.com/sphinx-extensions2)

### Modern Sphinx tutorials

- [sphinx-lesson: structured lessons with Sphinx — Sphinx-lesson documentation](https://coderefinery.github.io/sphinx-lesson/)

> That’s the spirit!

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 20, 2023, 8:43am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/3 "2023-07-20T08:43:16Z")

</div>

Hi again,

we had the chance to bring the Furo theme to a few other projects we are co-maintaining. It looks so beautiful out of the box, we love it.

- [https://mqttwarn.readthedocs.io/en/latest/](https://mqttwarn.readthedocs.io/en/latest/)
- [phenodata documentation](https://phenodata.readthedocs.io/en/latest/)
- [Kotori DAQ](https://kotori.readthedocs.io/en/latest/)
- [https://hiveeyes.org/docs/arduino/](https://hiveeyes.org/docs/arduino/)

Specifically, we would like to outline those pages, where we used some design elements (grid system and badges) from sphinx{design}, in order to build information-dense tables, and the Mermaid extension, in order to make users grasp data flows and system architectures quickly.

#### sphinx{design}

- [Firmware overview - Hiveeyes Arduino](https://hiveeyes.org/docs/arduino/firmware/overview.html)
- [Integrations - Kotori DAQ](https://kotori.readthedocs.io/en/latest/integration/)
- [The Things Stack & Network (TTS, TTN) - Kotori DAQ](https://kotori.readthedocs.io/en/latest/integration/tts-ttn.html)

#### Mermaid

- [Overview: Sensor network telemetry](https://hiveeyes.org/docs/arduino/index.html#sensor-network-telemetry)

With kind regards,  
Andreas.

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 20, 2023, 8:44am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/4 "2023-07-20T08:44:08Z")

</div>

We just discovered another modern Sphinx theme, Shibuya. The theme is using a subset of the [Lucid](https://lucide.dev/) icons, and also provides light-/dark-mode styles. We like it.

- [https://shibuya.lepture.com/](https://shibuya.lepture.com/)
- [GitHub - lepture/shibuya: A responsive, good looking with modern design documentation theme for Sphinx](https://github.com/lepture/shibuya)

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 20, 2023, 8:51am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/5 "2023-07-20T08:51:03Z")

</div>

### Applied modernizations

Integrating a few of the packages enumerated above, and a few generalized web elements from [sphinx-design-elements](https://sphinx-design-elements.readthedocs.io/), which is in turn leveraging the excellent [sphinx{design}](https://sphinx-design.readthedocs.io/), we are adding the foundation for corresponding modernizations to the [CrateDB Documentation Theme](https://github.com/crate/crate-docs-theme).

- [https://github.com/crate/crate-docs-theme/pull/378](https://github.com/crate/crate-docs-theme/pull/378)

It also has dedicated pages at [https://crate-docs-theme.readthedocs.io/](https://crate-docs-theme.readthedocs.io/), demonstrating a few components and elements, and how to use them, both with reStructuredText (rST) and Markedly Structured Text (MyST).

### First steps

Those patches in downstream documentation repositories start building upon that.

- [NG: Thoroughly modernize content and appearance by amotl · Pull Request #33 · crate/crate-clients-tools · GitHub](https://github.com/crate/crate-clients-tools/pull/33)
- [Documentation: Proposal for new "CrateDB Reference Manual" homepage by amotl · Pull Request #14521 · crate/crate · GitHub](https://github.com/crate/crate/pull/14521)
- [Documentation: Proposal for new "CrateDB Cloud" homepage by amotl · Pull Request #9 · crate/cloud-docs · GitHub](https://github.com/crate/cloud-docs/pull/9)

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 20, 2023, 9:34am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/6 "2023-07-20T09:34:43Z")

</div>

> [@Andreas.Motl](#):
>
> The excellent [Furo](https://pradyunsg.me/furo/) theme advertises itself as _a clean customisable Sphinx documentation theme_.

It is built on top of [GitHub - pradyunsg/sphinx-basic-ng: A modernised skeleton for Sphinx themes.](https://github.com/pradyunsg/sphinx-basic-ng), which might be the right place to shop for a foundation to build other custom themes upon.

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [July 23, 2023, 9:18pm UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/7 "2023-07-23T21:18:09Z")

</div>

## Lutra Theme

### Introduction

> [@Andreas.Motl](#):
>
> [Furo](https://github.com/pradyunsg/furo) is built on top of [sphinx-basic-ng](https://github.com/pradyunsg/sphinx-basic-ng).

On [Expectations - sphinx-basic-ng](https://sphinx-basic-ng.readthedocs.io/en/latest/expectations/), I just discovered [Lutra](https://github.com/pradyunsg/lutra).

> [@Pradyun Gedam](#):
>
> ### Derivative Themes
> 
> At the time of writing, this project has a no backwards compatibility policy – the project is in an alpha state, with only two known downstream themes: Furo and Lutra.

### Resources

- [Lutra](https://pradyunsg.me/lutra/)
- [GitHub - pradyunsg/lutra: Ooops, I wrote another Sphinx theme! [very WIP, do not use] · GitHub](https://github.com/pradyunsg/lutra)

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [August 2, 2023, 10:56am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/8 "2023-08-02T10:56:29Z")

</div>

## Awesome Sphinx Theme

We just discovered another awesome theme by [Kai Welke](https://github.com/kai687).

- [https://sphinxawesome.xyz/](https://sphinxawesome.xyz/)
- [GitHub - kai687/sphinxawesome-theme: Create beautiful and awesome websites with the Sphinx documentation generator. · GitHub](https://github.com/kai687/sphinxawesome-theme)

---

<div class="post-metadata">

**Author:** ![Andreas.Motl](https://community.panodata.org/user_avatar/community.panodata.org/andreas.motl/32/9_2.png) [@Andreas.Motl](https://community.panodata.org/u/Andreas.Motl)\
**Post date:** [August 2, 2023, 11:42am UTC](https://community.panodata.org/t/technical-advancements-in-sphinx/278/9 "2023-08-02T11:42:00Z")

</div>

## Sphinx Link Tree

We started to toy around with a new [`linktree` directive](https://github.com/panodata/sphinx-design-elements/pull/11), and are open to receive early feedback from the community about it. We hope you will enjoy its capabilities.

### References

- [Discussing and shaping the `linktree` directive · Issue #14 · tech-writing/sphinx-design-elements · GitHub](https://github.com/panodata/sphinx-design-elements/issues/14)
- [Intersphinx support in toctrees · Issue #1836 · sphinx-doc/sphinx · GitHub](https://github.com/sphinx-doc/sphinx/issues/1836#issuecomment-1662046318)
