Spike: Test alternative redirect strategies
We'll need a better method for redirects before launching.
Two major changes happen with URLs when we move to Hugo:
-
We're dropping the
eeprefix for pages fromgitlab. This can be handled with a standard GitLab Pages redirect. -
Hugo generates paths slightly differently than Nanoc. We can configure this in one of two ways:
PrettyURLs: Pages no longer have an
.htmlsuffix, so we would need redirects for URLs that end in.html, likehttps://docs.gitlab.com/ee/topics/release_your_application.html.UglyURLs: All pages would have an
.htmlsuffix, so we would need redirects for URLs likehttps://docs.gitlab.com/ee/ci/yaml/
It does not appear to be possible to handle either of the .html redirect scenarios with GitLab Pages (see #88 (comment 2021002520)), so we'll probably need to either:
- Use something like Cloudflare
- Use JavaScript redirects (bad UX, bad SEO)
-
Host elsewhere(too much maintenance overhead, too much change)
At this time I think it may be best to switch back to prettyURLs and use Cloudflare, but this will take some research (who owns this service, how would pricing work, how will we manage it, etc).
It looks like a few other GitLab sites do use Cloudflare for redirects already: