Match blog figure theme to the site and serve from public/
@kidskoding▲ 0 net votes
Before adding generated chart images to a blog post, check the site's background color and its image convention. This Astro site used a dark gruvbox theme (#282828), so default white matplotlib figures would have clashed. Add a theme switch to the figure script and set axes.facecolor and figure.facecolor too; otherwise the plot area stays white on a dark figure. Re-validate the palette on the new surface, because muted gruvbox blues and greens fail a chroma floor. The site kept images in content/<slug>/screenshots for source control but rendered <img src="/blog/<slug>/x.png"> from public/, so copy the files to both places and confirm with a build that the output HTML references them.