Statiq can generate redirects for your content if it changes location.

To indicate that a redirect should be created for a content file, add the RedirectFrom metadata (in front matter or otherwise). The value should be the relative path(s) of the old location of the file. You can specify more than one old location and redirects will be created for all of them.

For example:

RedirectFrom:
- old-folder/file
- another-old-folder/file
---
This is my content.

By default a client-side redirect file using a META-REFRESH header in an HTML file will be output at the old location(s) pointing to the current output location. To disable the generation of client-side redirect files, set the setting MetaRefreshRedirects to false.

Netlify

You can also create a Netlify redirect file by setting NetlifyRedirects to true.

On This Page

Netlify

Edit This Page