I was just checking out the docs for {{ redirect }}. It would be nice if you could trigger a 301/302 and routing to the new URL. Or trigger a 404 and keep the URL, but load the 404 view. I'm thinking you could pass this as a param like:

{{ redirect src="/the-new-page" code="301" }}
{{ redirect code="404" }}

I know you can hardcode redirects with status codes in /config/vanity.yaml but this would be useful for on-the-fly situations like when a value doesn't exist in taxonomies.html.