-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Correct NextJS link URL #5488
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
Correct NextJS link URL #5488
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,14 +7,14 @@ title: Getting Started | |||||||||||||||||
|
|
||||||||||||||||||
| - [Start a new project from scratch](#start-a-new-project-from-scratch) to quickly learn how Start works (see below) | ||||||||||||||||||
| - Refer to a migration guide for your specific framework: | ||||||||||||||||||
| - [Next.js](../guide/migrate-from-next-js) | ||||||||||||||||||
| - [Next.js](../migrate-from-next-js) | ||||||||||||||||||
| - Remix 2 / React Router 7 "Framework Mode" (coming soon!) | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Start a new project from scratch | ||||||||||||||||||
|
|
||||||||||||||||||
| Choose one of the following options to start building a _new_ TanStack Start project: | ||||||||||||||||||
|
|
||||||||||||||||||
| - [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable | ||||||||||||||||||
| - [TanStack Start CLI](../quick-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable | ||||||||||||||||||
| - [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks | ||||||||||||||||||
| - [Quick Start Examples](../quick-start) Download or clone one of our official examples | ||||||||||||||||||
| - [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file. | ||||||||||||||||||
|
Comment on lines
+17
to
20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix quick-start and build-from-scratch link paths All three links point to -- [TanStack Start CLI](../quick-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
+- [TanStack Start CLI](./quick-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
...
-- [Quick Start Examples](../quick-start) Download or clone one of our official examples
+- [Quick Start Examples](./quick-start) Download or clone one of our official examples
-- [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.
+- [Build a project from scratch](./build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.18.1)18-18: No empty links (MD042, no-empty-links) 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken relative path to Next.js migration guide
Using
../migrate-from-next-jsclimbs out of thereact/directory, landing on a non-existentframework/migrate-from-next-jspage. Switch to the local./migrate-from-next-jspath so the link resolves toframework/react/migrate-from-next-js.📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~10-~10: There might be a mistake here.
Context: ...or your specific framework: - Next.js - Remix 2 / React Router 7 "Framework Mode...
(QB_NEW_EN)
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the other link change follow the precedent in the file of links that work properly. I'm not close enough to the project to know why they're all beginning with
../.Would be interested to learn if there's an easy explanation 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 2032
🏁 Script executed:
Length of output: 1634
🏁 Script executed:
Length of output: 29100
@aaronjordan Great question! 🙂
The
../pattern works here because TanStack uses a custom documentation framework that handles link resolution differently from standard filesystem relative paths. Looking at thedocs/start/config.jsonfile, I can see how the routing structure is defined.Here's what's happening:
From the file system perspective:
docs/start/framework/react/getting-started.md../quick-startwould normally resolve todocs/start/framework/quick-start.md(which doesn't exist!)But from the documentation framework's perspective:
config.jsonwhere routes are defined as:"to": "framework/react/getting-started""to": "framework/react/quick-start""to": "framework/react/migrate-from-next-js"How the framework resolves
../links:The documentation build system treats
../as a special prefix that gets intelligently resolved against the routing structure. When you're on a page atframework/react/getting-startedand use:../quick-start→ resolves toframework/react/quick-start../guide/routing→ resolves toframework/react/guide/routing../migrate-from-next-js→ resolves toframework/react/migrate-from-next-jsThis is why your change from
../guide/migrate-from-next-jsto../migrate-from-next-jsis correct—it matches the actual route structure defined in the config, where the migration guide is atframework/react/migrate-from-next-js, notframework/react/guide/migrate-from-next-js.The
../prefix is essentially a convention used by the TanStack docs framework to indicate "resolve this relative to the current page's context" rather than performing literal directory traversal.