You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read the Docs username (if applicable): danielnoord
Expected Result
We're a moving a folder in our documentation. Specifically the move is: doc/messages/* to /doc/user_guide/messages/*.
After messing around with the redirects (a lot) we finally figured out how to set up a global exact redirect for all pages that fell under the messages directory (over 250+ pages, a page for each message pylint can emit).
One of the issues we ran into was that we couldn't use the $lang or $version variables. So, for the relevant PR (pylint-dev/pylint#6628) we had to do:
Type: Exact Redirect
From URL: /en/6628/messages/$rest
To URL: /en/6628/user_guide/messages/
This allowed us to test the PR, but then after the final merge we would need to add this as well:
Type: Exact Redirect
From URL: /en/latest/messages/$rest
To URL: /en/latest/user_guide/messages/
While this works for now, if we bump our version from 2.14 (current) to 2.15 the 2.14 documentation would break unless we add a redirect for /en/2.14/.
Similarly, all other languages won't benefit from this redirect as we only capture en.
Although I understand the concern that by using $version you would also redirect (for example) /en/2.5/ which doesn't have the directory moved, this shouldn't be an issue. Since the move hasn't taken place /en/2.5/messages/* shouldn't return any 404's and therefore no redirect will occur.
As far as I can see the only issue would be /en/2.5/messages/non-exisiting-page.html > /en/2.5/user_guide/messages/non-existing-page.html. But the effect of that would be the same: a 404. The change in url for that 404 is a risk/bug I would be willing to take.
Actual Result
Allow use of $lang and $version in Exact Redirects.
If the proposal is accepted and somebody could point me to the code that is currently handling these redirects I would be willing to take a look myself. I have no idea of how this is coded, but I feel like copying some of the expansion that happens for Page Redirects could be copied to Exact Redirects to fix this?
The text was updated successfully, but these errors were encountered:
While this works for now, if we bump our version from 2.14 (current) to 2.15 the 2.14 documentation would break unless we add a redirect for /en/2.14/.
Details
Expected Result
We're a moving a folder in our documentation. Specifically the move is:
doc/messages/*
to/doc/user_guide/messages/*
.After messing around with the redirects (a lot) we finally figured out how to set up a global exact redirect for all pages that fell under the
messages
directory (over 250+ pages, a page for each messagepylint
can emit).One of the issues we ran into was that we couldn't use the
$lang
or$version
variables. So, for the relevant PR (pylint-dev/pylint#6628) we had to do:This allowed us to test the PR, but then after the final merge we would need to add this as well:
While this works for now, if we bump our version from
2.14
(current) to2.15
the2.14
documentation would break unless we add a redirect for/en/2.14/
.Similarly, all other languages won't benefit from this redirect as we only capture
en
.Although I understand the concern that by using
$version
you would also redirect (for example)/en/2.5/
which doesn't have the directory moved, this shouldn't be an issue. Since the move hasn't taken place/en/2.5/messages/*
shouldn't return any 404's and therefore no redirect will occur.As far as I can see the only issue would be
/en/2.5/messages/non-exisiting-page.html
>/en/2.5/user_guide/messages/non-existing-page.html
. But the effect of that would be the same: a 404. The change in url for that 404 is a risk/bug I would be willing to take.Actual Result
Allow use of
$lang
and$version
in Exact Redirects.If the proposal is accepted and somebody could point me to the code that is currently handling these redirects I would be willing to take a look myself. I have no idea of how this is coded, but I feel like copying some of the expansion that happens for Page Redirects could be copied to Exact Redirects to fix this?
The text was updated successfully, but these errors were encountered: