-
Notifications
You must be signed in to change notification settings - Fork 742
Expand file tree
/
Copy pathtoc.ts
More file actions
181 lines (174 loc) · 5.75 KB
/
toc.ts
File metadata and controls
181 lines (174 loc) · 5.75 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import FRESH_VERSIONS_1x from "../versions.json" with { type: "json" };
import LATEST_VERSION_2 from "../packages/fresh/deno.json" with {
type: "json",
};
type RawTableOfContents = Record<
string,
{
label: string;
content: Record<string, RawTableOfContentsEntry>;
}
>;
interface RawTableOfContentsEntry {
title: string;
link?: string;
pages?: [string, string, string?][];
}
const toc: RawTableOfContents = {
latest: {
label: LATEST_VERSION_2.version,
content: {
introduction: {
title: "Introduction",
link: "latest",
},
"getting-started": {
title: "Getting Started",
link: "latest",
},
concepts: {
title: "Concepts",
link: "latest",
pages: [
["app", "App", "link:latest"],
["middleware", "Middlewares", "link:latest"],
["context", "Context", "link:latest"],
["routing", "Routing", "link:latest"],
["islands", "Islands", "link:latest"],
["static-files", "Static files", "link:latest"],
["file-routing", "File routing", "link:latest"],
],
},
advanced: {
title: "Advanced",
link: "latest",
pages: [
["app-wrapper", "App wrapper", "link:latest"],
["layouts", "Layouts", "link:latest"],
["error-handling", "Error handling", "link:latest"],
["partials", "Partials", "link:latest"],
["forms", "Forms", "link:latest"],
["define", "Define Helpers", "link:latest"],
["environment-variables", "Environment Variables", "link:latest"],
["head", "Modifying <head>", "link:latest"],
["vite", "Vite Plugin Options", "link:latest"],
["troubleshooting", "Troubleshooting", "link:latest"],
["builder", "Builder (Legacy)", "link:latest"],
],
},
deployment: {
title: "Deployment",
link: "latest",
pages: [
["deno-deploy", "Deno Deploy", "link:latest"],
["deno-compile", "deno compile", "link:latest"],
["docker", "Docker", "link:latest"],
["cloudflare-workers", "Cloudflare Workers", "link:latest"],
],
},
testing: {
title: "Testing",
link: "latest",
},
plugins: {
title: "Plugins",
link: "latest",
pages: [
["cors", "cors", "link:latest"],
["csrf", "csrf", "link:latest"],
["csp", "csp", "link:latest"],
["trailing-slashes", "trailingSlashes", "link:latest"],
],
},
examples: {
title: "Examples",
link: "latest",
pages: [
["migration-guide", "Migration Guide", "link:latest"],
["daisyui", "daisyUI", "link:latest"],
["markdown", "Rendering Markdown", "link:latest"],
["rendering-raw-html", "Rendering raw HTML", "link:latest"],
[
"sharing-state-between-islands",
"Sharing state between islands",
"link:latest",
],
["active-links", "Active links", "link:latest"],
["session-management", "Session management", "link:latest"],
],
},
},
},
"1.x": {
label: FRESH_VERSIONS_1x[0],
content: {
introduction: {
title: "Introduction",
},
"getting-started": {
title: "Getting Started",
pages: [
["create-a-project", "Create a project"],
["running-locally", "Running locally"],
["create-a-route", "Create a route"],
["dynamic-routes", "Dynamic routes"],
["custom-handlers", "Custom handlers"],
["form-submissions", "Form submissions"],
["adding-interactivity", "Adding interactivity"],
["deploy-to-production", "Deploy to production"],
],
},
concepts: {
title: "Concepts",
pages: [
["architecture", "Architecture"],
["server-components", "Server Components"],
["routing", "Routing"],
["routes", "Routes"],
["app-wrapper", "App wrapper"],
["layouts", "Layouts"],
["forms", "Forms"],
["islands", "Interactive islands"],
["static-files", "Static files"],
["middleware", "Middlewares"],
["error-pages", "Error pages"],
["partials", "Partials"],
["data-fetching", "Data fetching"],
["ahead-of-time-builds", "Ahead-of-time Builds"],
["deployment", "Deployment"],
["plugins", "Plugins"],
["updating", "Updating Fresh"],
["server-configuration", "Server configuration"],
],
},
integrations: {
title: "Integrations",
},
examples: {
title: "Examples",
pages: [
["migrating-to-tailwind", "Migrating to Tailwind"],
["modifying-the-head", "Modifying the <head>"],
["writing-tests", "Writing tests"],
["changing-the-src-dir", "Changing the source directory"],
["using-twind-v1", "Using Twind v1"],
["init-the-server", "Initializing the server"],
["using-fresh-canary-version", "Using Fresh canary version"],
["dealing-with-cors", "Dealing with CORS"],
["creating-a-crud-api", "Creating a CRUD API"],
["handling-complex-routes", "Handling complex routes"],
["rendering-markdown", "Rendering markdown"],
["rendering-raw-html", "Rendering raw HTML"],
["sharing-state-between-islands", "Sharing state between islands"],
["using-csp", "Using CSP"],
["active-links", "Styling active links"],
[
"client-side-components-and-libraries",
"Client only side components",
],
],
},
},
},
};
export default toc;