Hosting Hugo on AWS

After spending the majority of today trying to figure this out, I’d like to discuss how this very Hugo blog is hosted on AWS with CloudFront and S3, because it was a monstrosity to get to thanks to S3. TL;DR: Add the uglyurls = true configuration key in your config.toml. That changes the URLs rendered to the ugly form: baseUrl/posts/homelab.html. These are well liked by S3 website hosting buckets.

Read more...

Generating Code from OpenAPI Schemas

The idea of contract-first development with OpenAPI pops up every now and then with the team. The idea is pretty simple on paper: write an OpenAPI YAML/JSON file before you touch a line of code. This file declares the APIs and Model data that will be expected by your APIs. Others can consume this file as guidance on how to interact with your APIs. Sounds good, right? After the schema is written, code must be manifested that is an implementation of that contract.

Read more...