Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06f901b

Browse files
authored
Merge pull request #36 from QuLogic/redir-contribute
Redirect development guides from /stable to /devdocs
2 parents 6fdba76 + d955879 commit 06f901b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

templates/Caddyfile.j2

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ http://{{ caddy.addresses.main }}, http://{{ ansible_fqdn }} {
8383
# Make search go to the actual docs instead of the mostly-empty brochure site.
8484
redir /search.html /stable/search.html?{query} temporary
8585

86+
# Redirect contributing guides to latest version.
87+
# If you go to /devel/...?reallystable=1 you can avoid the redirect.
88+
@devel {
89+
path /stable/devel /stable/devel/*
90+
not query reallystable=1
91+
}
92+
handle @devel {
93+
route {
94+
uri strip_prefix /stable
95+
redir * /devdocs{uri}
96+
}
97+
}
98+
8699
# Place the brochure site at the top level.
87100
@brochure file {
88101
root {{ caddy.site_dir }}/mpl-brochure-site

0 commit comments

Comments
 (0)