Everything I Automated on This Blog
Description and use
Automating post publishing, image generation, structured data, dev.to cross‑posting, and newsletter drafts for a Hugo blog on Azure Static Web Apps using GitHub Actions.
Problem
Automating routine post‑publishing tasks for a Hugo blog hosted on Azure Static Web Apps to reduce manual effort and errors.
Outcome
The blog now publishes posts automatically, generates share images, inserts structured data, cross‑posts to dev.to, creates newsletter drafts, and exports Markdown, all without manual intervention, except for final newsletter sending and other social media posts.
Workflow
- Configure GitHub Actions workflow with jobs for build, deploy, and post‑processing
- Use Hugo --buildFuture to allow future‑dated posts to be built
- Generate 1200x630 og.png images using Hugo image filters and TrueType font
- Create JSON‑LD BlogPosting block by serializing a Hugo dict and marking it safe
- Run Python script after build to cross‑post to dev.to via Forem API, handling canonical URLs, links, tags, series, and descriptions
- Create Buttondown newsletter drafts for new posts, with status draft
- Export each post as index.md alongside index.html and serve llms.txt
- Add workflow_dispatch trigger to allow manual re‑run of the workflow
- Exclude .md, .txt, .xml, .json from Azure Static Web Apps fallback to prevent MIME type issues
Evidence
Hugo skips any post whose date is in the future unless you build with --buildFuture.
Every page gets a 1200 by 630 share image rendered by Hugo itself, with no Puppeteer, no Node, and no image service.
My first version wrote the JSON by hand in the template and piped each value through jsonify:… That looks right and is wrong.
The deploy workflow has a job that runs after the build and calls a small Python script against the Forem API.
A second job watches for added posts and creates a Buttondown email for each, with the title and a link.
Every post is also published as index.md next to its index.html, from a four‑line template that emits the title, description, date and the raw Markdown source.
- Record date: 2026-10-16T15:55:58.547Z