This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
[MXNet-970] improve tutorial redirection #12607
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the tutorial redirects. It takes the request for an old version tutorial and maps the request back to the default version of the website with the document request intact.
Prior to my #12540 update, users would land on untested, broken tutorials. However, I found it less than ideal that a request to an old tutorial wouldn't just take you to the latest one. This PR does just that.
Say a user googles image prediction with mxnet and gets this result:
http://34.201.8.176/versions/0.11.0/tutorials/python/predict_image.html
Before, they'd get to it and if they were on Windows, it wouldn't work. This was fixed a couple of months ago.
With my recent update, they redirect to the tutorials index which was better than going to a broken tutorial, but with this update they just redirect the latest version of the tutorial:
http://34.201.8.176/tutorials/python/predict_image.html
Say a user finds an old google result or link to this old LSTM tutorial that's been deleted: http://34.201.8.176/versions/0.11.0/tutorials/speech_recognition/speech_lstm.html
We'll give them a 404.
Thanks goes to @ddavydenko for guiding me on the frustrating journey of regexes.
✨ https://regex101.com/ FTW! ✨