A Sample Makefile for Publishing Blog Articles
As some readers may already know, this site has been running on a static site generator since late 2014/early 2015, when I migrated from WordPress to Jekyll on GitHub Pages. I’ve since migrated again, this time to Hugo on S3/CloudFront. Along the way, I’ve taken an interest in using make and a Makefile to help automate certain tasks at the CLI. In this post, I’ll share how I’m using a Makefile to help with publishing blog articles.
If you’re not familiar with make or its use of a Makefile, have a look at this article I wrote on using a Makefile with Markdown documents, then come back here.
In general, the process for publishing a blog post using Hugo and S3/CloudFront basically looks like this:
- Write the blog post. (I haven’t found a tool to automate this yet!)
- Put the blog post into the right section of the Hugo directory tree. (In my setup, it’s in the
content/postdirectory.) - Build the static site using
hugo. - Upload the resulting HTML files to the appropriate S3 bucket.
- Invalidate the appropriate URLs (paths) in AWS CloudFront so that the CDN picks up the new files/pages.
Some of these steps Continue reading
At the outset, a 1200 word article about saving configuration sounds strange. It would perhaps be perfectly normal if the topic was Vi and not
Containers are expected to see an adoption surge next year.