Blaugust inspired me to make some much-needed technical changes to the blog this month, which I will now try to recall for posterity.
- Various page layout changes. I add a word count, for example, and I put the
.Summarytext at the top of each page, so it’s the first thing you see on mobile, instead of a giant header image that you immediately need to scroll past. I don’t like that the summary text repeats below the image too but it’s part of
.Contentand I can’t figure out how to filter it out.
- I added years of old writing blog archives, but they aren’t accessible yet unless you know what to look for. I’m not entirely sure how to approach that. I don’t necessarily want to put a neon sign up and say “here’s my old writing that’s quite bad in hindsight.” Also not sure yet how to redirect from another domain to this one, or if it’s worth the bother.
- Added code to programmatically read image sizes at build time. When putting images into HTML, it’s generally advisable to put the exact image dimensions into the
<img>tag, for various reasons, but I never did, because I don’t know them and don’t have time to go through hundreds of old images and figure them out. So I modified my Hugo templates to read the image resources and calculate the image size in the blog template. That fixed a bunch of image layout problems on the blog. (Unfortunately it also introduced new problems, in that the Hugo build is much slower, and the build will fail if any images are inaccessible across the network at build time. A problem for another day.)
- And the biggest change: I switched from serving the blog from an (expensive) AWS Elastic Beanstalk reverse proxy to fully serving the blog from an (inexpensive) AWS Amplify static site. This was made possible by figuring out how to give AWS Amplify a list of some 100+ old link redirects through a JSON file. (For example, redirecting
/index.xml, a vitally important redirect for anyone who has ever added my blog to an RSS reader at any time in the past.) I switched the domain name over from Beanstalk to Amplify on 8/25/2022.
- Oh and I made a shortcode for this footer down here so I only have to type
blaugust2022 day="26"at the bottom: