This wasn't really a very scalable solution, as each time I created a new content type, I'd need to add a new case statement.
But recently I learned about Hugo's [`.Render`](https://gohugo.io/functions/render/) functionality, which means I can update my templates to just call to `.Render`: