Skip to content

Commit e4c8e83

Browse files
authored
fix: add posthog url proxy (#240)
2 parents 48c1353 + d797609 commit e4c8e83

File tree

1 file changed

+64
-39
lines changed

1 file changed

+64
-39
lines changed

docusaurus.config.js

Lines changed: 64 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
// (when paired with `@ts-check`).
44
// There are various equivalent ways to declare your Docusaurus config.
55
// See: https://docusaurus.io/docs/api/docusaurus-config
6-
import { injectSpeedInsights } from "@vercel/speed-insights";
6+
import { injectSpeedInsights } from "@vercel/speed-insights"
77
/* const {
88
remarkCodeHike,
99
} = require("@code-hike/mdx");
1010
*/
11-
import path from "path";
12-
import { themes as prismThemes } from "prism-react-renderer";
11+
import path from "path"
12+
import { themes as prismThemes } from "prism-react-renderer"
1313

1414
/** @type {import('@docusaurus/types').Config} */
1515
const config = {
1616
title: "RunPod Documentation",
17-
tagline: "Globally distributed GPU cloud built for production. Develop, train, and scale AI applications.",
17+
tagline:
18+
"Globally distributed GPU cloud built for production. Develop, train, and scale AI applications.",
1819
favicon: "img/favicon.ico",
1920
url: "https://docs.runpod.io",
2021
baseUrl: "/",
@@ -216,15 +217,14 @@ const config = {
216217
hideable: false,
217218
},
218219
},
219-
announcementBar: {
220+
announcementBar: {
220221
id: "h200s",
221222
content:
222-
"Deploy your workloads on H200s for 1.4x the performance of H100. <a href=\"https://www.runpod.io/console/deploy?gpu=H200+SXM\">Learn more</a>.",
223+
'Deploy your workloads on H200s for 1.4x the performance of H100. <a href="https://www.runpod.io/console/deploy?gpu=H200+SXM">Learn more</a>.',
223224
backgroundColor: "#004a7f",
224225
textColor: "#ffffff",
225226
isCloseable: true,
226227
},
227-
228228
},
229229

230230
scripts: [
@@ -233,7 +233,8 @@ const config = {
233233
"data-website-id": "d8e25089-cadd-4c1c-9010-7e83cd99a2a5",
234234
"data-project-name": "RunPod",
235235
"data-project-color": "#070D27",
236-
"data-project-logo": "https://avatars.githubusercontent.com/u/95939477?s=200&v=4",
236+
"data-project-logo":
237+
"https://avatars.githubusercontent.com/u/95939477?s=200&v=4",
237238
async: true,
238239
},
239240
{
@@ -256,68 +257,92 @@ const config = {
256257
"posthog-docusaurus",
257258
{
258259
apiKey: "phc_1ku7R949l2D5wsXgMCBNSRIVRMiAn8FyKFNoJWDCcOb",
260+
appUrl: "https://observe.runpod.io",
259261
},
260262
],
261263
[
262264
"@docusaurus/plugin-client-redirects",
263265
{
264266
createRedirects(existingPath) {
265-
const redirects = [];
266-
// Redirect from /serverless/workers/vllm/ to /serverless/vllm/
267+
const redirects = []
268+
// Redirect from /serverless/workers/vllm/ to /serverless/vllm/
267269
if (existingPath.startsWith("/serverless/vllm/")) {
268-
redirects.push(existingPath.replace("/serverless/vllm/", "/serverless/workers/vllm/"));
270+
redirects.push(
271+
existingPath.replace(
272+
"/serverless/vllm/",
273+
"/serverless/workers/vllm/"
274+
)
275+
)
269276
}
270277
// Redirect from /serverless/workers/handlers/ to /serverless/handlers/
271278
else if (existingPath.startsWith("/serverless/handlers/")) {
272-
redirects.push(existingPath.replace("/serverless/handlers/", "/serverless/workers/handlers/"));
279+
redirects.push(
280+
existingPath.replace(
281+
"/serverless/handlers/",
282+
"/serverless/workers/handlers/"
283+
)
284+
)
273285
}
274286
// Redirect from /serverless/workers/development/ to /serverless/development/
275287
else if (existingPath.startsWith("/serverless/development/")) {
276-
redirects.push(existingPath.replace("/serverless/development/", "/serverless/workers/development/"));
277-
}
278-
else if (existingPath.includes('/serverless/endpoints/')) {
279-
redirects.push(existingPath.replace('/serverless/endpoints/', '/serverless/references/'));
280-
}
281-
else if (existingPath.includes('/tutorials/serverless/')) {
282-
redirects.push(existingPath.replace('/tutorials/serverless/', '/tutorials/serverless/gpu/'));
288+
redirects.push(
289+
existingPath.replace(
290+
"/serverless/development/",
291+
"/serverless/workers/development/"
292+
)
293+
)
294+
} else if (existingPath.includes("/serverless/endpoints/")) {
295+
redirects.push(
296+
existingPath.replace(
297+
"/serverless/endpoints/",
298+
"/serverless/references/"
299+
)
300+
)
301+
} else if (existingPath.includes("/tutorials/serverless/")) {
302+
redirects.push(
303+
existingPath.replace(
304+
"/tutorials/serverless/",
305+
"/tutorials/serverless/gpu/"
306+
)
307+
)
283308
}
284-
return redirects;
309+
return redirects
285310
},
286311

287312
redirects: [
288313
{
289-
to: '/serverless/endpoints/send-requests',
290-
from: '/serverless/endpoints/get-started',
314+
to: "/serverless/endpoints/send-requests",
315+
from: "/serverless/endpoints/get-started",
291316
},
292317
{
293-
to: '/serverless/endpoints/operations',
294-
from: '/serverless/endpoints/job-operations',
318+
to: "/serverless/endpoints/operations",
319+
from: "/serverless/endpoints/job-operations",
295320
},
296321
{
297-
to: '/references/glossary',
298-
from: '/glossary',
322+
to: "/references/glossary",
323+
from: "/glossary",
299324
},
300325
{
301-
to: '/references/billing-information',
302-
from: '/get-started/billing-information',
326+
to: "/references/billing-information",
327+
from: "/get-started/billing-information",
303328
},
304329
{
305-
to: '/references/referrals',
306-
from: '/get-started/referrals',
330+
to: "/references/referrals",
331+
from: "/get-started/referrals",
307332
},
308333
{
309-
to: '/tutorials/introduction/overview',
310-
from: '/tutorials/overview',
334+
to: "/tutorials/introduction/overview",
335+
from: "/tutorials/overview",
311336
},
312337
{
313-
to: '/tutorials/serverless/run-ollama-inference',
314-
from: '/tutorials/serverless/cpu/run-ollama-inference',
338+
to: "/tutorials/serverless/run-ollama-inference",
339+
from: "/tutorials/serverless/cpu/run-ollama-inference",
315340
},
316-
]
341+
],
317342
},
318-
]
343+
],
319344
],
320-
};
345+
}
321346

322-
export default config;
323-
injectSpeedInsights();
347+
export default config
348+
injectSpeedInsights()

0 commit comments

Comments
 (0)