You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This starts your app in development mode, rebuilding assets on file changes.
21
+
22
+
## Editing and previewing the docs of TanStack projects locally
23
+
24
+
The documentations for all TanStack projects except for `React Charts` are hosted on [https://tanstack.com](https://tanstack.com), powered by this TanStack Router app.
25
+
In production, the markdown doc pages are fetched from the GitHub repos of the projects, but in development they are read from the local file system.
26
+
27
+
Follow these steps if you want to edit the doc pages of a project (in these steps we'll assume it's [`TanStack/form`](https://github.com/tanstack/form)) and preview them locally :
28
+
29
+
1. Create a new directory called `tanstack`.
30
+
31
+
```sh
32
+
mkdir tanstack
33
+
```
34
+
35
+
2. Enter the directory and clone this repo and the repo of the project there.
> Your `tanstack` directory should look like this:
45
+
>
46
+
> ```
47
+
> tanstack/
48
+
> |
49
+
> +-- form/
50
+
> |
51
+
> +-- tanstack.com/
52
+
> ```
53
+
54
+
> [!WARNING]
55
+
> Make sure the name of the directory in your local file system matches the name of the project's repo. For example, `tanstack/form` must be cloned into `form` (this is the default) instead of `some-other-name`, because that way, the doc pages won't be found.
56
+
57
+
3. Enter the `tanstack/tanstack.com` directory, install the dependencies and run the app in dev mode:
58
+
59
+
```sh
60
+
cd tanstack.com
61
+
pnpm i
62
+
# The app will run on https://localhost:3000 by default
63
+
pnpm dev
64
+
```
65
+
66
+
4. Now you can visit http://localhost:3000/form/latest/docs/overview in the browser and see the changes you make in `tanstack/form/docs`.
67
+
68
+
> [!NOTE]
69
+
> The updated pages need to be manually reloaded in the browser.
70
+
71
+
> [!WARNING]
72
+
> You will need to update the `docs/config.json` file (in the project's repo) if you add a new doc page!
0 commit comments