Skip to content

Commit 212732e

Browse files
authored
docs: add docs config and proper example docs overrides (#115)
1 parent 0232063 commit 212732e

File tree

11 files changed

+902
-22
lines changed

11 files changed

+902
-22
lines changed

docs/config.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/TanStack/tanstack.com/main/tanstack-docs-config.schema.json",
3+
"docSearch": {
4+
"appId": "",
5+
"apiKey": "",
6+
"indexName": "tanstack-db"
7+
},
8+
"sections": [
9+
{
10+
"label": "Getting Started",
11+
"children": [
12+
{
13+
"label": "Overview",
14+
"to": "overview"
15+
},
16+
{
17+
"label": "Quick Start",
18+
"to": "quick-start"
19+
},
20+
{
21+
"label": "Installation",
22+
"to": "installation"
23+
}
24+
],
25+
"frameworks": [
26+
{
27+
"label": "react",
28+
"children": [
29+
{
30+
"label": "React Adapter",
31+
"to": "framework/react/adapter"
32+
}
33+
]
34+
},
35+
{
36+
"label": "vue",
37+
"children": [
38+
{
39+
"label": "Vue Adapter",
40+
"to": "framework/vue/adapter"
41+
}
42+
]
43+
}
44+
]
45+
},
46+
{
47+
"label": "Guides",
48+
"children": [
49+
50+
]
51+
},
52+
{
53+
"label": "API Reference",
54+
"children": [
55+
{
56+
"label": "Core API Reference",
57+
"to": "reference/index"
58+
}
59+
],
60+
"frameworks": [
61+
{
62+
"label": "react",
63+
"children": [
64+
{
65+
"label": "React Hooks",
66+
"to": "framework/react/reference/index"
67+
}
68+
]
69+
},
70+
{
71+
"label": "vue",
72+
"children": [
73+
{
74+
"label": "Vue Hooks",
75+
"to": "framework/vue/reference/index"
76+
}
77+
]
78+
}
79+
]
80+
},
81+
{
82+
"label": "Examples",
83+
"children": [],
84+
"frameworks": [
85+
{
86+
"label": "react",
87+
"children": [
88+
{
89+
"label": "Todo List",
90+
"to": "framework/react/examples/todo"
91+
}
92+
]
93+
}
94+
]
95+
}
96+
]
97+
}

docs/framework/react/adapter.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: TanStack DB React Adapter
3+
id: adapter
4+
---
5+
6+
## Installation
7+
8+
```sh
9+
npm install @tanstack/react-db
10+
```
11+
12+
## React Hooks
13+
14+
See the [React Functions Reference](../reference/index.md) to see the full list of hooks available in the React Adapter.
15+
16+
## Basic Usage
17+

docs/framework/solid/adapter.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: TanStack DB Solid Adapter
3+
ref: docs/framework/react/adapter.md
4+
replace: {
5+
"React": "Solid",
6+
"react": "solid"
7+
}
8+
---

docs/framework/svelte/adapter.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: TanStack DB Svelte Adapter
3+
ref: docs/framework/react/adapter.md
4+
replace: {
5+
"React": "Svelte",
6+
"react": "svelte"
7+
}
8+
---

docs/framework/vue/adapter.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: TanStack DB Vue Adapter
3+
ref: docs/framework/react/adapter.md
4+
replace: {
5+
"React": "Vue",
6+
"react": "vue"
7+
}
8+
---

docs/installation.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Installation
3+
id: installation
4+
---
5+
6+
You can install TanStack DB with any [NPM](https://npmjs.com) package manager.
7+
8+
Only install one of the following packages depending on your use case:
9+
10+
## React
11+
12+
```sh
13+
npm install @tanstack/react-db
14+
```
15+
16+
TanStack DB is compatible with React v16.8+
17+
18+
## Solid
19+
20+
```sh
21+
npm install @tanstack/solid-db
22+
```
23+
24+
COMING SOON
25+
26+
## Svelte
27+
28+
```sh
29+
npm install @tanstack/svelte-db
30+
```
31+
32+
COMING SOON
33+
34+
## Vue
35+
36+
```sh
37+
npm install @tanstack/vue-db
38+
```
39+
40+
TanStack DB is compatible with Vue v3.3.0+
41+
42+
## Vanilla JS
43+
44+
```sh
45+
npm install @tanstack/db
46+
```
47+
48+
Install the the core `@tanstack/db` package to use with any framework or without a framework. Each framework package up above will also re-export everything from this core package.

0 commit comments

Comments
 (0)