Setting up blog-kit to publish to dev.to with a built-in leak check

The author uses blog-kit, a small Python tool for publishing to the dev.to API, to post articles, render diagrams, and make cover images. Its key feature is a leak check that scans drafts for private IP ranges, API keys, and password-style secrets, refusing to publish even on a dry run. Every run is a dry run unless the --publish flag is passed, and the tool needs only Python 3 and its standard library. After publishing, it reads the article back from dev.to to confirm the published_at timestamp, since the API's create response shows published: null even on success. The guide also covers rendering SVG diagrams with librsvg and using white backgrounds so they remain visible in dev.to's dark mode.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in