Generate the release cycle chart directly as SVG by encukou · Pull Request #1034 · python/devguide
Instead of Mermaid, use jinja2. Sphinx uses jinja for templating as well, so it might be possible to integrate this more tightly, but an include file works nicely for now. (It's actually easy to generate this chart just with f-strings, but I don't want to set a bad example for people who shouldn't fully trust their input. Jinja has autoescaping to prevent SVG injections.) Styling is done from the main stylesheet, and is bit more straightforward. I've adjusted the colours to be a bit friendlier to colour-blind people. There are vertical lines for all years now -- Mermaid's skipping of every other year was pretty confusing. Year labels have been shortened. This should work for another 10 years. The caption is removed; it was redundant in our case. Precise sizing is hard to do with SVG, but the font family, size and line height should nearly match the main text on big screens. At least in the current theme. In the code, `sorted_versions` is now a list, and the dicts in it have some extra generated info.
hugovk
changed the title
Generate the release cycle chart directly as SVG
Infra: Generate the release cycle chart directly as SVG
hugovk
changed the title
Infra: Generate the release cycle chart directly as SVG
Generate the release cycle chart directly as SVG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters