Simon Willison: TILs on sphinx

sphinx Format code examples in documentation with blacken-docs - 2022-04-24

I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. …

sphinx Adding Sphinx autodoc to a project, and configuring Read The Docs to build it - 2021-08-10

I built a new API reference page today for sqlite-utils, using the Sphinx autodoc extension to extract docstrings from the code and use them to build a full class reference. …

sphinx Using sphinx.ext.extlinks for issue links - 2021-02-17

Datasette's release notes are formatted using Sphinx. Almost every bullet point links to the corresponding GitHub issue, so they were full of lines that look like this: …