Repository navigation
Expand file tree
/
Copy pathsite.config.ts
More file actions
84 lines (80 loc) · 3.39 KB
/
Copy pathsite.config.ts
File metadata and controls
84 lines (80 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import type { GroupId } from "./content/types.ts";
export const site = {
name: "Homeostate",
summary:
"State-manager and CRDT-backend agnostic sync engine: keep a Zustand, Redux, MobX, Jotai, " +
"Valtio, TanStack Store, NgRx Signals or MobX-State-Tree store in sync with a Yjs, Loro or Automerge document.",
/** The landing page's meta description; like a page's, at most 160 characters. */
description:
"Keep a Zustand, Redux, MobX, Jotai, Valtio, TanStack Store, NgRx Signals or MobX-State-Tree " +
"store in sync with a Yjs, Loro or Automerge document.",
repo: "https://github.com/mixedrays/homeostate",
branch: "main",
npm: "https://www.npmjs.com/package",
npmOrg: "https://www.npmjs.com/org/homeostate",
/** Where `/docs` sends readers. */
docsHome: "/docs/getting-started",
conceptsPage: "/docs/concepts",
/** Every package by group; the header's "Packages" link. */
packagesPage: "/docs/packages",
/** The guide whose header shows the docs app's version, GitHub and npm. */
aboutPage: "/docs/about",
} as const;
/** The site header's links, also in the landing footer; the manifest checks each has a page. */
export const siteNav = [
{ label: "Docs", to: site.docsHome },
{ label: "Concepts", to: site.conceptsPage },
{ label: "Packages", to: site.packagesPage },
] as const;
/**
* `role` names one of the group's packages; a package introduction's title leads with its label
* and role ("Yjs CRDT backend"), since its H1 is the package name.
*/
export const groups: { id: GroupId; title: string; role?: string }[] = [
{ id: "guides", title: "Guides" },
{ id: "core", title: "Core", role: "sync engine" },
{ id: "crdt", title: "CRDT backends", role: "CRDT backend" },
{ id: "store", title: "Store adapters", role: "store adapter" },
{ id: "persist", title: "Persistence", role: "persistence adapter" },
{ id: "frameworks", title: "UI frameworks", role: "bindings" },
{ id: "tools", title: "Tools" },
];
/**
* Sidebar label and order per package slug; the group comes from the slug's prefix. `hint` is
* the landing page card's one-line trade-off, for CRDT backends only; back it with the
* package's docs.
*/
export const packageNav: Record<
string,
{ label: string; order: number; hint?: string }
> = {
core: { label: "Core", order: 0 },
"crdt-yjs": {
label: "Yjs",
order: 1,
hint: "Syncs through any Yjs provider, such as y-websocket. y-indexeddb can store it.",
},
"crdt-loro": {
label: "Loro",
order: 2,
hint: "You wire replication, and it has no storage package of its own. Ships WebAssembly.",
},
"crdt-automerge": {
label: "Automerge",
order: 3,
hint: "automerge-repo can sync and store the document for you. Ships WebAssembly.",
},
"store-zustand": { label: "Zustand", order: 1 },
"store-redux": { label: "Redux", order: 2 },
"store-mobx": { label: "MobX", order: 3 },
"store-mobx-state-tree": { label: "MobX-State-Tree", order: 4 },
"store-jotai": { label: "Jotai", order: 5 },
"store-valtio": { label: "Valtio", order: 6 },
"store-tanstack": { label: "TanStack Store", order: 7 },
"store-ngrx-signals": { label: "NgRx Signals", order: 8 },
"persist-indexeddb": { label: "IndexedDB", order: 1 },
"persist-local-storage": { label: "localStorage", order: 2 },
react: { label: "React", order: 1 },
"tool-devtools": { label: "Devtools", order: 1 },
"tool-simulator": { label: "Simulator", order: 2 },
};