Skip to content

Conversation

@AlexAndBear
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the landing page navigation by making documentation links version-aware, ensuring users are directed to their preferred documentation version instead of always defaulting to the latest version.

Changes:

  • Added logic to construct documentation URLs based on the user's preferred version
  • Updated all three documentation links (user, admin, developer) to use dynamic paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return `/docs/${section}/`;
}

return `${preferredVersion.path}/${section}/`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the preferredVersion.path guaranteed to not have a trailing slash? 🙈 Do you have some utility function at hand you can use for robust path joining, like our urlJoin in web, so that it will get harder to break paths?

Copy link
Collaborator Author

@AlexAndBear AlexAndBear Jan 23, 2026

Choose a reason for hiding this comment

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

Is the preferredVersion.path guaranteed to not have a trailing slash?

Yes, because it also relies on joining further parts to build consistent URLs , the (preferred)version object is auto-generated and relies on that format.

Do you have some utility function at hand

Unfortunately, there is no docusaurus public api for that. I could add something similar for that use case, but It feels a little overengineered

Copy link
Contributor

Choose a reason for hiding this comment

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

mainly wanted to make sure that you're sure 😁 enforcing it would have been the icing on the cake. not a requirement from me

@AlexAndBear AlexAndBear requested a review from kulmann January 23, 2026 07:45
@AlexAndBear AlexAndBear merged commit 36124e1 into main Jan 23, 2026
2 checks passed
@AlexAndBear AlexAndBear deleted the feat-landing-page-urls-navigate-to-selected-version branch January 23, 2026 09:35
@openclouders openclouders mentioned this pull request Jan 23, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants