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

Preserve the path when redirecting the latest version #923

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peterguy
Copy link
Contributor

@peterguy peterguy commented Jan 24, 2025

When redirecting links that contain the latest version in the path, only the slug was being preserved, and the redirect was going to sourcegraph.com.

Change that to preserve the whole path (except the version), and to preserve the current host.

For example:

http://localhost:3000/docs/v/5.11/code_search/reference/queries should redirect to /docs/code_search/reference/queries, which should finally redirect to /docs/code-search/queries

Behavior of /@5.11/ should be the same as /v/5.11/.

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 9:52pm

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.

1 participant