Skip to content

fix(docs): redirect version banner to current page in stable Fixes #…#1

Open
Bharath420 wants to merge 1 commit into
masterfrom
fix-docs-version-banner-redirect
Open

fix(docs): redirect version banner to current page in stable Fixes #…#1
Bharath420 wants to merge 1 commit into
masterfrom
fix-docs-version-banner-redirect

Conversation

@Bharath420
Copy link
Copy Markdown
Owner

Fixes argoproj#26857

Summary

The version banner now redirects users to the same page in the stable version instead of the docs home page. This preserves user context when switching from latest/previous versions to stable.

Problem

When viewing documentation for a previous or latest version, clicking the banner link redirects to the docs home page instead of the same page in stable version. This is disorienting and requires users to navigate back to the page they were reading.

Solution

  • Extract current path from URL
  • Replace version segment with /en/stable/
  • Maintain page context in banner redirect link

Example

Before: /en/latest/user-guide/kustomize//en/stable/ (home page)
After: /en/latest/user-guide/kustomize//en/stable/user-guide/kustomize/ (same page)

Testing

  • Verified redirect maintains current page path
  • No breaking changes to existing functionality

…goproj#26857

The version banner now redirects to the same page in the stable
version instead of the docs home page. This preserves user context
when switching from latest/previous versions to stable.

Changes:
- Extract current path from URL
- Replace version segment with /en/stable/
- Maintain page context in banner redirect link

Signed-off-by: Bharath Madvar <39058743+Bharath420@users.noreply.github.com>
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.

'Previous version' banner should redirect to /stable/<current-page> instead of docs home page

1 participant