Skip to content

fix: add posthog url proxy #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 64 additions & 39 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import { injectSpeedInsights } from "@vercel/speed-insights";
import { injectSpeedInsights } from "@vercel/speed-insights"
/* const {
remarkCodeHike,
} = require("@code-hike/mdx");
*/
import path from "path";
import { themes as prismThemes } from "prism-react-renderer";
import path from "path"
import { themes as prismThemes } from "prism-react-renderer"

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "RunPod Documentation",
tagline: "Globally distributed GPU cloud built for production. Develop, train, and scale AI applications.",
tagline:
"Globally distributed GPU cloud built for production. Develop, train, and scale AI applications.",
favicon: "img/favicon.ico",
url: "https://docs.runpod.io",
baseUrl: "/",
Expand Down Expand Up @@ -216,15 +217,14 @@ const config = {
hideable: false,
},
},
announcementBar: {
announcementBar: {
id: "h200s",
content:
"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>.",
'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>.',
backgroundColor: "#004a7f",
textColor: "#ffffff",
isCloseable: true,
},

},

scripts: [
Expand All @@ -233,7 +233,8 @@ const config = {
"data-website-id": "d8e25089-cadd-4c1c-9010-7e83cd99a2a5",
"data-project-name": "RunPod",
"data-project-color": "#070D27",
"data-project-logo": "https://avatars.githubusercontent.com/u/95939477?s=200&v=4",
"data-project-logo":
"https://avatars.githubusercontent.com/u/95939477?s=200&v=4",
async: true,
},
{
Expand All @@ -256,68 +257,92 @@ const config = {
"posthog-docusaurus",
{
apiKey: "phc_1ku7R949l2D5wsXgMCBNSRIVRMiAn8FyKFNoJWDCcOb",
appUrl: "https://observe.runpod.io",
},
],
[
"@docusaurus/plugin-client-redirects",
{
createRedirects(existingPath) {
const redirects = [];
// Redirect from /serverless/workers/vllm/ to /serverless/vllm/
const redirects = []
// Redirect from /serverless/workers/vllm/ to /serverless/vllm/
if (existingPath.startsWith("/serverless/vllm/")) {
redirects.push(existingPath.replace("/serverless/vllm/", "/serverless/workers/vllm/"));
redirects.push(
existingPath.replace(
"/serverless/vllm/",
"/serverless/workers/vllm/"
)
)
}
// Redirect from /serverless/workers/handlers/ to /serverless/handlers/
else if (existingPath.startsWith("/serverless/handlers/")) {
redirects.push(existingPath.replace("/serverless/handlers/", "/serverless/workers/handlers/"));
redirects.push(
existingPath.replace(
"/serverless/handlers/",
"/serverless/workers/handlers/"
)
)
}
// Redirect from /serverless/workers/development/ to /serverless/development/
else if (existingPath.startsWith("/serverless/development/")) {
redirects.push(existingPath.replace("/serverless/development/", "/serverless/workers/development/"));
}
else if (existingPath.includes('/serverless/endpoints/')) {
redirects.push(existingPath.replace('/serverless/endpoints/', '/serverless/references/'));
}
else if (existingPath.includes('/tutorials/serverless/')) {
redirects.push(existingPath.replace('/tutorials/serverless/', '/tutorials/serverless/gpu/'));
redirects.push(
existingPath.replace(
"/serverless/development/",
"/serverless/workers/development/"
)
)
} else if (existingPath.includes("/serverless/endpoints/")) {
redirects.push(
existingPath.replace(
"/serverless/endpoints/",
"/serverless/references/"
)
)
} else if (existingPath.includes("/tutorials/serverless/")) {
redirects.push(
existingPath.replace(
"/tutorials/serverless/",
"/tutorials/serverless/gpu/"
)
)
}
return redirects;
return redirects
},

redirects: [
{
to: '/serverless/endpoints/send-requests',
from: '/serverless/endpoints/get-started',
to: "/serverless/endpoints/send-requests",
from: "/serverless/endpoints/get-started",
},
{
to: '/serverless/endpoints/operations',
from: '/serverless/endpoints/job-operations',
to: "/serverless/endpoints/operations",
from: "/serverless/endpoints/job-operations",
},
{
to: '/references/glossary',
from: '/glossary',
to: "/references/glossary",
from: "/glossary",
},
{
to: '/references/billing-information',
from: '/get-started/billing-information',
to: "/references/billing-information",
from: "/get-started/billing-information",
},
{
to: '/references/referrals',
from: '/get-started/referrals',
to: "/references/referrals",
from: "/get-started/referrals",
},
{
to: '/tutorials/introduction/overview',
from: '/tutorials/overview',
to: "/tutorials/introduction/overview",
from: "/tutorials/overview",
},
{
to: '/tutorials/serverless/run-ollama-inference',
from: '/tutorials/serverless/cpu/run-ollama-inference',
to: "/tutorials/serverless/run-ollama-inference",
from: "/tutorials/serverless/cpu/run-ollama-inference",
},
]
],
},
]
],
],
};
}

export default config;
injectSpeedInsights();
export default config
injectSpeedInsights()