Fix redirecting unversioned pages to latest version #41
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.
This seems to work, but I am very cautious about what surprises it might introduce.
@flynnduism The underlying issue is that we used to redirect
/spin/whatever
to/spin/v3/whatever
so that unversioned links always took you to the latest version. Removing the base/spin
directory means we can no longer do that. And of course we can't redirect/...
because well catastrophe that is why. So what I've done as an interim measure is redirect single-segment paths on the questionable assumption that everything "real" is two or more levels deep (e.g./hub/foo
,/downloads/foo
,/static/foo
). But I feel like I'm introducing a fragile reliance on that. So it would be good when the pressure is off you to think we should have a discussion about bringing back a directory to hold the docs pages separately from "other stuff" like assets and blogs and downloads and all that. Although I guess "when the pressure is off" may be so far away that there will be too many links to the root-level pages that we can't go back anyway...!