HTTP 301 redirects in Eleventy

This is well-trodden ground, but this how I do HTTP 301 redirects in Eleventy, mostly to have a reference for the Apache vs. nginx syntax. I’m sticking with the Hugo aliases convention in the front-matter data: --- title: My post aliases: - /my-previous-url/ - /my-other-previous-url/ --- Here’s the Eleventy configuration to gather all the aliases in a collection of { from, to } objects. All…