Open History to see the last commit
1# Welcome to TanStack.com!
2β
3This site is built with TanStack Router!
4β
5- [TanStack Router Docs](https://tanstack.com/router)
6β
7It's deployed automagically with Netlify!
8β
9- [Netlify](https://netlify.com/)
10β
11## Development
12β
13From your terminal:
14β
15```sh
16pnpm install
17pnpm dev
18```
19β
20This starts your app in development mode, rebuilding assets on file changes.
21β
22## Editing and previewing the docs of TanStack projects locally
23β
24The documentations for all TanStack projects except for `React Charts` are hosted on [https://tanstack.com](https://tanstack.com), powered by this TanStack Router app.
25In 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β
27Follow 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β
291. Create a new directory called `tanstack`.
30β
31```sh
32mkdir tanstack
33```
34β
352. Enter the directory and clone this repo and the repo of the project there.
36β
37```sh
38cd tanstack
39git clone git@github.com:TanStack/tanstack.com.git
40git clone git@github.com:TanStack/form.git
41```
42β
43> [!NOTE]
44> 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β
573. Enter the `tanstack/tanstack.com` directory, install the dependencies and run the app in dev mode:
58β
59```sh
60cd tanstack.com
61pnpm i
62# The app will run on https://localhost:3000 by default
63pnpm dev
64```
65β
664. 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!