Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
288 lines (283 loc) · 8.57 KB
/
Copy pathastro.config.mjs
File metadata and controls
288 lines (283 loc) · 8.57 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
// @ts-check
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
import starlightLlmsTxt from "starlight-llms-txt";
import starlightThemeRapide from "starlight-theme-rapide";
// https://astro.build/config
export default defineConfig({
site: "https://endform.dev",
base: "/docs",
outDir: "./dist/docs",
trailingSlash: "never",
build: {
// This is needed when you want to remove trailing slashes with static output.
format: "file",
},
integrations: [
starlight({
title: "Endform docs",
plugins: [
starlightThemeRapide(),
starlightLlmsTxt({
projectName: "Endform",
customSets: [
{
label: "Getting started",
paths: [
"index",
"guides/getting-started",
"guides/getting-started/local-cli/**",
"reference/requirements",
],
description:
"set up Endform and run an existing Playwright suite for the first time",
},
{
label: "Run and configure Endform",
paths: [
"explanation/custom-reporters",
"explanation/transfer-state-to-remote-runners",
"explanation/webkit-browser-support",
"guides/getting-started",
"guides/proxy-via-local",
"guides/tune-playwright-suite-performance",
"reference/endform-config*",
"reference/environment-variables",
"reference/requirements",
],
description:
"use the Endform CLI with your existing Playwright setup and configure remote test execution",
},
{
label: "Test health and history",
paths: [
"explanation/dashboard-analytics",
"reference/analytics-cli",
"reference/mcp-server",
"guides/investigate-test-history-with-ai",
],
description:
"use the dashboard, Endform CLI, or MCP server to find flaky, failing, and slow tests and inspect past runs and traces",
},
{
label: "Debugging tests",
paths: ["reference/mcp-server", "guides/debug-tests-with-ai"],
description:
"set up and use the Endform MCP server to query test history and debug Playwright tests with your AI agent",
},
{
label: "How Endform works",
paths: [
"index",
"explanation/what-is-endform",
"explanation/how-your-tests-are-run",
],
description:
"what Endform is and how it runs Playwright tests in parallel on isolated machines",
},
{
label: "GitHub Actions, CI, and Vercel",
paths: [
"guides/getting-started/github-actions/**",
"guides/getting-started/other-ci/**",
"guides/vercel-integration/**",
],
description:
"run Endform in GitHub Actions or another CI system and test Vercel preview deployments",
},
],
minify: {
whitespace: false,
},
customSelectors: {
all: [".sl-anchor-link", ".selector-panel"],
},
promote: ["index", "guides/getting-started"],
exclude: ["guides/getting-started/*/*/*"],
}),
],
customCss: [
"@fontsource/inter/400.css",
"@fontsource/inter/400-italic.css",
"@fontsource/inter/500.css",
"@fontsource/inter/600.css",
"@fontsource/inter/700.css",
"/src/styles/custom.css",
],
components: {
Sidebar: "./src/components/Sidebar.astro",
},
routeMiddleware: "./src/routeData.ts",
logo: {
dark: "./src/assets/endform-logo-wordmark-colored-on-dark-padding.svg",
light:
"./src/assets/endform-logo-wordmark-colored-on-light-padding.svg",
replacesTitle: true,
alt: "Endform logo",
},
social: [
{
icon: "external",
label: "Endform Dashboard",
href: "https://endform.dev/app",
},
{
icon: "discord",
label: "Discord",
href: "https://endform.dev/discord",
},
{
icon: "github",
label: "GitHub",
href: "https://github.com/endformdev",
},
],
sidebar: [
{
label: "Explanation",
items: [{ autogenerate: { directory: "explanation" } }],
},
{
label: "Guides",
items: [{ autogenerate: { directory: "guides" } }],
},
{
label: "Tutorial",
items: [{ autogenerate: { directory: "tutorial" } }],
},
{
label: "Reference",
items: [{ autogenerate: { directory: "reference" } }],
},
],
head:
process.env.NODE_ENV === "development"
? []
: [
// Set theme before third-party scripts to avoid a dark flash on light theme.
{
tag: "script",
content: `(() => {
try {
const storedTheme = localStorage.getItem("starlight-theme");
const preferredTheme =
storedTheme === "light" || storedTheme === "dark"
? storedTheme
: window.matchMedia("(prefers-color-scheme: light)").matches
? "light"
: "dark";
document.documentElement.dataset.theme = preferredTheme;
} catch {
document.documentElement.dataset.theme = window.matchMedia("(prefers-color-scheme: light)").matches
? "light"
: "dark";
}
})();`,
},
{
tag: "script",
attrs: {
src: "https://web.cmp.usercentrics.eu/modules/autoblocker.js",
},
},
{
tag: "script",
attrs: {
id: "usercentrics-cmp",
async: true,
src: "https://web.cmp.usercentrics.eu/ui/loader.js",
"data-settings-id": "Q-tQAA7pNF0dcE",
},
},
{
tag: "script",
attrs: {
defer: true,
src: "https://static.cloudflareinsights.com/beacon.min.js",
"data-cf-beacon":
'{"token":"962bb11e04cf44df87f086d758a37710"}',
},
},
{
tag: "script",
// Google Tag Manager
content: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MG4F2GKF');`,
},
{
tag: "script",
attrs: {
id: "posthog-js",
type: "text/javascript",
},
content: `
!(function (t, e) {
var o, n, p, r
e.__SV ||
((window.posthog = e),
(e._i = []),
(e.init = function (i, s, a) {
function g(t, e) {
var o = e.split(".")
;(2 == o.length && ((t = t[o[0]]), (e = o[1])),
(t[e] = function () {
t.push([e].concat(Array.prototype.slice.call(arguments, 0)))
}))
}
;(((p = t.createElement("script")).type = "text/javascript"),
(p.crossOrigin = "anonymous"),
(p.async = true),
(p.src = s.api_host + "/static/array.js"),
(r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(
p,
r
))
var u = e
void 0 !== a ? (u = e[a] = []) : (a = "posthog")
u.people = u.people || []
u.toString = function (t) {
var e = "posthog"
return ("posthog" !== a && (e += "." + a), t || (e += " (stub)"), e)
}
u.people.toString = function () {
return u.toString(1) + ".people (stub)"
}
o =
"capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(
" "
)
for (n = 0; n < o.length; n++) g(u, o[n])
e._i.push([i, s, a])
}),
(e.__SV = 1))
})(document, window.posthog || [])
posthog.init("phc_CFBLzSpXHQAX9UYMiHudLL3iYWgXfnUVOCuEd079EV1", {
ui_host: "eu.posthog.com",
api_host: "/p5g",
defaults: "2025-05-24",
disable_surveys: true,
})
`,
},
{
tag: "script",
attrs: {
type: "text/javascript",
},
content: `
!function(key) {
if (window.reb2b) return;
window.reb2b = {loaded: true};
var s = document.createElement("script");
s.async = true;
s.src = "https://ddwl4m2hdecbv.cloudfront.net/b/" + key + "/" + key + ".js.gz";
document.getElementsByTagName("script")[0].parentNode.insertBefore(s, document.getElementsByTagName("script")[0]);
}("VN080H3J986J");`,
},
],
}),
],
});