From d95587918acf92344e96964865ee496d62364477 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 30 Nov 2023 21:27:56 -0500 Subject: [PATCH] Redirect development guides from /stable to /devdocs --- templates/Caddyfile.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/templates/Caddyfile.j2 b/templates/Caddyfile.j2 index f2929da..37ba2d5 100644 --- a/templates/Caddyfile.j2 +++ b/templates/Caddyfile.j2 @@ -83,6 +83,19 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} { # Make search go to the actual docs instead of the mostly-empty brochure site. redir /search.html /stable/search.html?{query} temporary + # Redirect contributing guides to latest version. + # If you go to /devel/...?reallystable=1 you can avoid the redirect. + @devel { + path /stable/devel /stable/devel/* + not query reallystable=1 + } + handle @devel { + route { + uri strip_prefix /stable + redir * /devdocs{uri} + } + } + # Place the brochure site at the top level. @brochure file { root {{ caddy.site_dir }}/mpl-brochure-site