docs: use http-redirect when possible
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Sat, 1 Jan 2022 13:03:53 +0000 (14:03 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Jan 2022 23:26:50 +0000 (23:26 +0000)
GitLab Pages has added a feature to do proper HTTP redirects, which
are genreally better than the HTML redirects we currently use.

Unfortunately, it doesn't support redirecting to other domains, all
paths must start with a slash. So there's sadly *one* redirect this
doesn't work for. So let's leave that one using a HTML redirect, and
use HTTP redirects when we can.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14369>

docs/_extra/_redirects [new file with mode: 0644]
docs/conf.py

diff --git a/docs/_extra/_redirects b/docs/_extra/_redirects
new file mode 100644 (file)
index 0000000..ceb66d9
--- /dev/null
@@ -0,0 +1,9 @@
+/drivers/vmware-guest.html /drivers/svga3d.html 301
+/gallium/drivers/freedreno.html /drivers/freedreno.html 301
+/gallium/drivers/freedreno/ir3-notes.html /drivers/freedreno/ir3-notes.html 301
+/gallium/drivers/llvmpipe.html /drivers/llvmpipe.html 301
+/gallium/drivers/zink.html /drivers/zink.html 301
+/llvmpipe.html /drivers/llvmpipe.html 301
+/postprocess.html /gallium/postprocess.html 301
+/versions.html /relnotes.html 301
+/vmware-guest.html /drivers/vmware-guest.html 301
index 998f209..ab4c338 100644 (file)
@@ -135,15 +135,6 @@ html_extra_path = [
 ]
 
 html_redirects = [
-  ('drivers/vmware-guest', 'drivers/svga3d.html'),
-  ('gallium/drivers/freedreno', 'drivers/freedreno.html'),
-  ('gallium/drivers/freedreno/ir3-notes', 'drivers/freedreno/ir3-notes.html'),
-  ('gallium/drivers/llvmpipe', 'drivers/llvmpipe.html'),
-  ('gallium/drivers/zink', 'drivers/zink.html'),
-  ('llvmpipe', 'drivers/llvmpipe.html'),
-  ('postprocess', 'gallium/postprocess.html'),
-  ('versions', 'relnotes.html'),
-  ('vmware-guest', 'drivers/vmware-guest.html'),
   ('webmaster', 'https://www.mesa3d.org/website/'),
 ]