Generate custom redirects.
For example:produces a file in the output called
"redirects": [
["cirodown", "ourbigbook"]
],
cirodown.html
that redirects to ourbigbook.html
.Absolute URLs are also accepted, e.g.:produces a file in the output called
"redirects": [
["ourbigbook", "https://docs.ourbigbook.com"]
],
ourbigbook.html
that redirects to https://docs.ourbigbook.com
.When dealing with regular headers, you generally don't want to use this option and instead use the
\H
synonym
argument, which already creates the redirection for you.This JSON option can be useful however for dealing with things that are outside of your OurBigBook project.
For example, at one point, this project renamed the repository github.com/cirosantilli/cirodown to github.com/ourbigbook/ourbigbook.
Unfortunately, GitHub Pages does not generate redirects like github.com itself.
So in this case, we've added to the which produces a file in the output called
ourbigbook.json
of the toplevel user repository github.com/cirosantilli/cirosantilli.github.io the lines:"redirects": [
["cirodown", "ourbigbook"]
],
cirodown.html
that redirects to ourbigbook.html
.In this case,
cirodown
and ourbigbook
don't have to be any regular IDs present in the database, those strings are just used directly.TODO ideally we should check for conflicts with regular output from split headers IDs or their synonyms. But lazy.