Skip to content

Conversation

@nlynzaad
Copy link

based on changes merged with router 1.131.28 relative routing is always relative to current location unless a from is specified then its relative to the from. This brings this in line with the change

@netlify
Copy link

netlify bot commented Sep 23, 2025

‼️ Deploy request for tanstack rejected.

Name Link
🔨 Latest commit 619718e

@tannerlinsley
Copy link
Collaborator

How does this work with markdown links that need to navigate relative based on the current path? Do they also need to be updated?

@nlynzaad
Copy link
Author

No by default it resolves the relative link against the current path. It's only when the current path and the "rendered location" for example when using layouts in route paths that the from is required when the relative location is relative to the layout instead of the current path.

The relative links in the markdown files used in tanstack.com has always been relative to the one currently displayed, at least as far as router's links have been, and hence this works as expected. For example, the link in router's docs in code-based-routing.md to file-based-routing.md is set as ../file-based-routing.md which resolves from https://tanstack.com/router/latest/docs/framework/react/routing/code-based-routing to https://tanstack.com/router/latest/docs/framework/react/routing/file-based-routing

As part of the tests I did for this PR I randomly worked through a whole bunch of links in pacer, router and query and they all resolved correctly.

@nlynzaad
Copy link
Author

worked through all links in the start docs now and its 100% feature parity with current deployed version. picked up a few that needs to be fixed, but they are broken currently due to invalid relative paths used and not due to the change in 1.131.28.

@schiller-manuel
Copy link
Contributor

closing in favor of #508 which includes this

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.

3 participants