Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redirecting unversioned pages to latest version #41

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

itowlson
Copy link
Contributor

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...!

@itowlson itowlson requested review from flynnduism and vdice March 27, 2025 20:51
Copy link

🚀 preview deployed successfully to Fermyon Cloud and available at https://spin-docs-pr-41-r4qxodj1.fermyon.app

@itowlson itowlson force-pushed the fix-versionless-redirect branch from 4c8a9a7 to 91f4c47 Compare March 27, 2025 21:10
Copy link
Contributor

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preview deployment looks great and the broken-link-checker appears to confirm (only remaining broken link was my mistake and should be fixed in #42).

In addition, only single-segment redirects are used for spin docs from the developer site, so we look good there.

Agree with checking in with @flynnduism for a long-term fix but I'm happy with this approach to unblock spinframework.dev!

@itowlson itowlson merged commit 914523b into main Mar 27, 2025
2 of 3 checks passed
@itowlson
Copy link
Contributor Author

(force merged since the broken link is fixed elsewhere)

@vdice vdice deleted the fix-versionless-redirect branch March 27, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants