-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathvite.config.ts
More file actions
215 lines (212 loc) · 5.77 KB
/
vite.config.ts
File metadata and controls
215 lines (212 loc) · 5.77 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
import { defineConfig } from "vite";
import { nitro } from "nitro/vite";
import { solidStart } from "@solidjs/start/config";
import tailwindcss from "@tailwindcss/vite";
import { createSolidBase } from "@kobalte/solidbase/config";
import { osmium } from "solidbase-osmium";
import { createFilesystemSidebar } from "@kobalte/solidbase/config/sidebar";
const solidBase = createSolidBase(osmium);
export default defineConfig({
resolve: {
dedupe: ["@solidjs/start", "@kobalte/solidbase"], // TODO: Remove once start vite 8 releases (mismatch caused by preview release)
},
plugins: [
tailwindcss(),
solidBase.plugin({
title: "SolidJS Documentation",
description:
"Documentation for SolidJS, the signals-powered UI framework",
siteUrl: "https://docs.solidjs.com",
editPath: "https://github.com/solidjs/solid-docs/edit/main/:path",
routes: {
path: "/{project}/{version}",
project: {
default: "solid",
values: {
solid: { path: "", label: "Solid" },
router: { path: "solid-router", label: "Router" },
start: { path: "solid-start", label: "SolidStart" },
meta: { path: "solid-meta", label: "Meta" },
},
},
version: {
default: "latest",
values: {
latest: { path: "", label: "Latest" },
v2: { path: "v2", label: "v2" },
},
},
include: [
{
project: "solid",
version: ["latest", "v2"],
},
{
project: ["router", "start", "meta"],
version: "latest",
},
],
},
overrides: [
{
project: "router",
title: "Solid Router",
themeConfig: {
sidebar: {
"/solid-router": createFilesystemSidebar(
"./src/routes/solid-router"
),
},
},
},
{
project: "start",
title: "SolidStart",
themeConfig: {
sidebar: {
"/solid-start": createFilesystemSidebar(
"./src/routes/solid-start"
),
},
},
},
{
project: "meta",
title: "Solid Meta",
themeConfig: {
sidebar: {
"/solid-meta": createFilesystemSidebar("./src/routes/solid-meta"),
},
},
},
{
project: "solid",
version: "v2",
themeConfig: {
sidebar: {
"/v2": createFilesystemSidebar("./src/routes/v2", {
filter: (item) => {
return !["solid-router", "solid-start", "solid-meta"].some(
(project) =>
item.filePath.includes(`/src/routes/${project}`)
);
},
}),
},
},
},
],
themeConfig: {
sidebar: createFilesystemSidebar("./src/routes/", {
filter: (item) => {
return !["solid-router", "solid-start", "solid-meta", "v2"].some(
(project) => item.filePath.includes(`/src/routes/${project}`)
);
},
}),
discord: "https://discord.com/invite/solidjs",
github: "https://github.com/solidjs",
reportPagePath:
"https://github.com/solidjs/solid-docs/issues/new?assignees=ladybluenotes&labels=improve+documentation%2Cpending+review&projects=&template=CONTENT.yml&title=[Content]:&subject=:path&page=:url",
missingPagePath:
"https://github.com/solidjs/solid-docs/issues/new?title=[Search]+Missing+results+for+query+%22:path",
},
markdown: {
expressiveCode: {
themes: ["min-light", "material-theme-ocean"],
themeCssSelector: (theme) => `[data-theme="${theme.type}"]`,
frames: false,
styleOverrides: {
twoSlash: {
cursorColor: "var(--twoslash-cursor)",
},
},
},
toc: {
minDepth: 2,
},
packageManagers: {
presets: {
npm: {
install: "npm i :content",
"install-dev": "npm i :content -D",
"install-global": "npm i :content -g",
"install-local": "npm i",
remove: "npm remove :content",
update: "npm update :content",
run: "npm run :content",
exec: "npx :content",
create: "npm init :content",
},
pnpm: {
install: "pnpm i :content",
"install-dev": "pnpm i :content -D",
"install-global": "pnpm i :content -g",
"install-local": "pnpm i",
remove: "pnpm remove :content",
update: "pnpm update :content",
run: "pnpm :content",
exec: "pnpx :content",
create: "pnpm create :content",
},
yarn: {
install: "yarn add :content",
"install-dev": "yarn add :content -D",
"install-global": "yarn add :content -g",
"install-local": "yarn i",
remove: "yarn remove :content",
update: "yarn upgrade :content",
run: "yarn :content",
exec: "yarn dlx :content",
create: "yarn create :content",
},
bun: {
install: "bun i :content",
"install-dev": "bun i :content -d",
"install-global": "bun i :content -g",
"install-local": "bun i",
remove: "bun remove :content",
update: "bun update :content",
run: "bun run :content",
exec: "bunx :content",
create: "bun create :content",
},
deno: {
install: "deno add npm::content",
"install-dev": "deno add npm::content -D",
"install-global": "deno add npm::content -g",
"install-local": "deno i",
remove: "deno remove npm::content",
update: "deno update npm::content",
run: "deno run :content",
exec: "dpx :content",
create: "deno init --npm :content",
},
},
},
},
llms: true,
sitemap: true,
robots: {
rules: [
{
userAgent: "*",
allow: ["/"],
disallow: ["/i18n-status/"],
},
],
},
}),
solidStart(solidBase.startConfig()),
nitro({
preset: "netlify",
prerender: {
crawlLinks: true,
autoSubfolderIndex: false,
// failOnError: true,
// eslint-disable-next-line no-useless-escape
ignore: [/\{\getPath}/, /.*?emojiSvg\(.*/],
},
}),
],
});