TIL: use Plausible.io with a Sphinx documentation hosted on RTD

Although Google Analytics is very easy to setup on a Read the Docs-based documentation website, it requires a cookie banner to be GDPR-compliant and is otherwise questionable from a privacy-preservation point-of-view. As a result, I much prefer to use and support the excellent EU-based Plausible.io for traffic metrics instead. This article explains how to setup a Read the Docs-based documentation with Plausible.io such that metrics are enabled only on “production” builds — e....

October 9, 2022

TIL: using Sphinx substitutions to generate text snippets from code

Often, technical documentations include lists or other snippets of text that are strongly related to some of the project’s code. vpype’s documentation is no exception to this. For instance, the Built-in symbols section lists the units available to expressions: These units are related to the following piece of code: # vpype/utils.py UNITS = { "px": 1.0, "in": 96.0, "inch": 96.0, "ft": 12.0 * 96.0, "yd": 36.0 * 96.0, "mi": 1760.0 * 36....

September 30, 2022
close-up shot of a rotring .35mm pen on a plotted hatch fill test chart

Generating beautiful Python API documentation with Sphinx AutoAPI

Following a recent discussion on Twitter, I decided to take yet another deep dive in my Python projects' documentation and fix once and for all the issues I had with it. I first focused on the automatically-generated API reference section and this article details the results of my finding. Specifically, I’m using vsketch’s API reference, which I recently updated, as an example (documentation source. This article addresses the following objectives:...

May 10, 2022 · Last updated on May 11, 2022