Pre-rendering Mermaid and matplotlib charts to PNG before slide composition is the only approach that works reliably in headless CI. Here is what that looks like in practice.
What I learned adding diagram and chart slides to a CI-rendered YouTube pipeline