From fe816388f487986bd959ef5aa3d2310b1fd0d267 Mon Sep 17 00:00:00 2001 From: danstotts-ops Date: Wed, 19 Aug 2026 16:32:26 -0600 Subject: [PATCH] fix docs sitemap redirect sources --- .github/workflows/validate-tooltips.yml | 3 + get-started/manage-accounts.mdx | 122 --------------- pods/storage/create-network-volumes.mdx | 147 ------------------ references/billing-information.mdx | 58 ------- references/referrals.mdx | 78 ---------- scripts/validate-redirect-sources.js | 62 ++++++++ sdks/go/endpoints.mdx | 0 sdks/go/overview.mdx | 0 sdks/javascript/endpoints.mdx | 0 sdks/javascript/overview.mdx | 0 sdks/python/apis.mdx | 0 sdks/python/endpoints.mdx | 0 sdks/python/overview.mdx | 0 serverless/endpoints/operations.mdx | 0 tutorials/sdks/python/101/aggregate.mdx | 0 tutorials/sdks/python/101/async.mdx | 0 tutorials/sdks/python/101/error.mdx | 0 tutorials/sdks/python/101/generator.mdx | 0 tutorials/sdks/python/101/hello.mdx | 0 .../sdks/python/101/local-server-testing.mdx | 0 .../sdks/python/102/huggingface-models.mdx | 0 .../102/stable-diffusion-text-to-image.mdx | 0 .../sdks/python/get-started/hello-world.mdx | 0 .../sdks/python/get-started/introduction.mdx | 0 .../sdks/python/get-started/prerequisites.mdx | 0 .../python/get-started/running-locally.mdx | 0 26 files changed, 65 insertions(+), 405 deletions(-) delete mode 100644 get-started/manage-accounts.mdx delete mode 100644 pods/storage/create-network-volumes.mdx delete mode 100644 references/billing-information.mdx delete mode 100644 references/referrals.mdx create mode 100644 scripts/validate-redirect-sources.js delete mode 100644 sdks/go/endpoints.mdx delete mode 100644 sdks/go/overview.mdx delete mode 100644 sdks/javascript/endpoints.mdx delete mode 100644 sdks/javascript/overview.mdx delete mode 100644 sdks/python/apis.mdx delete mode 100644 sdks/python/endpoints.mdx delete mode 100644 sdks/python/overview.mdx delete mode 100644 serverless/endpoints/operations.mdx delete mode 100644 tutorials/sdks/python/101/aggregate.mdx delete mode 100644 tutorials/sdks/python/101/async.mdx delete mode 100644 tutorials/sdks/python/101/error.mdx delete mode 100644 tutorials/sdks/python/101/generator.mdx delete mode 100644 tutorials/sdks/python/101/hello.mdx delete mode 100644 tutorials/sdks/python/101/local-server-testing.mdx delete mode 100644 tutorials/sdks/python/102/huggingface-models.mdx delete mode 100644 tutorials/sdks/python/102/stable-diffusion-text-to-image.mdx delete mode 100644 tutorials/sdks/python/get-started/hello-world.mdx delete mode 100644 tutorials/sdks/python/get-started/introduction.mdx delete mode 100644 tutorials/sdks/python/get-started/prerequisites.mdx delete mode 100644 tutorials/sdks/python/get-started/running-locally.mdx diff --git a/.github/workflows/validate-tooltips.yml b/.github/workflows/validate-tooltips.yml index 47e2602eb..b35a55736 100644 --- a/.github/workflows/validate-tooltips.yml +++ b/.github/workflows/validate-tooltips.yml @@ -25,3 +25,6 @@ jobs: - name: Validate tooltip imports run: node scripts/validate-tooltips.js + + - name: Validate redirect source files + run: node scripts/validate-redirect-sources.js diff --git a/get-started/manage-accounts.mdx b/get-started/manage-accounts.mdx deleted file mode 100644 index a8872ea63..000000000 --- a/get-started/manage-accounts.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "Manage accounts" -description: "Create accounts, manage teams, and configure user permissions in Runpod." ---- - -import { PodsTooltip, ServerlessTooltip } from "/snippets/tooltips.jsx"; - -To access Runpod resources, you need to either create your own account or join an existing team through an invitation. This guide explains how to set up and manage accounts, teams, and user roles. - -## Create an account - -Sign up for a Runpod account at [console.runpod.io/signup](https://www.console.runpod.io/signup). - -Once created, you can use your account to deploy , create endpoints, and access other Runpod services. Personal accounts can be converted to team accounts at any time to enable collaboration features. - -## Convert to a team account - -Team accounts enable multiple users to collaborate on projects and share resources. - -To convert your personal account into a team account: - -1. Navigate to the [Team page](https://www.console.runpod.io/team) in the Runpod console. -2. Select **Convert to a Team Account**. -3. Enter a team name and confirm the conversion. - - - -You can revert your account back to a personal account at any time. To revert, scroll to the bottom of the [Team page](https://www.console.runpod.io/team) and select **Delete Team**. - - - -## Invite team members - -Team accounts can invite new members to collaborate. Each invitation includes a specific role that determines the member's permissions. - -Create Team Invite dialog showing role selection and required email field - -To invite a new member: - -1. Navigate to the [Team page](https://www.console.runpod.io/team) in the Runpod console. -2. In the **Members** section, select **Invite New Member**. -3. Choose [the appropriate role](#roles-and-permissions) for the new member. -4. Enter the email address of the person you want to invite and click **Create Invite**. -5. Copy the generated invitation link from the **Pending Invites** section and share it with the person you want to invite. - -Invitation links remain active until used or manually revoked. You can view all pending invitations in the team management interface. - -## Join a team - -When invited to join a team, you'll receive an invitation link from a team member. To accept: - -1. Click the invitation link provided by the team member. -2. Select **Join Team** to accept the invitation. - -Your account will gain access to the team's resources based on the role assigned to you. - -## Roles and permissions - -Runpod provides four distinct roles to control access within team accounts. Each role includes specific permissions designed for different responsibilities. - -| Permission | Basic | Billing | Dev | Admin | -|------------|-------|---------|-----|-------| -| Access team account | ✅ | ✅ | ✅ | ✅ | -| Connect to existing Pods | ✅ | ❌ | ✅ | ✅ | -| Create/delete/start/stop Pods | ❌ | ❌ | ✅ | ✅ | -| Create/delete Serverless endpoints | ❌ | ❌ | ✅ | ✅ | -| Send requests to Serverless endpoints | ✅ | ❌ | ✅ | ✅ | -| Connect to existing Instant Clusters | ✅ | ❌ | ✅ | ✅ | -| Create/delete/start/stop Instant Clusters | ❌ | ❌ | ❌ | ✅ | -| Create/update/delete network volumes | ❌ | ❌ | ✅ | ✅ | -| View billing information | ❌ | ✅ | ❌ | ✅ | -| Manage payment methods | ❌ | ✅ | ❌ | ✅ | -| Invite team members | ❌ | ❌ | ❌ | ✅ | -| Manage team permissions | ❌ | ❌ | ❌ | ✅ | -| Modify team account settings | ❌ | ❌ | ❌ | ✅ | -| Access audit logs | ❌ | ❌ | ❌ | ✅ | - -### Basic role - -The basic role provides essential access for users who need to work with existing resources without management capabilities. - -This role allows users to access the team account and connect to already-deployed computing resources (e.g., Pods and Serverless endpoints) for development work. Users with this role cannot view billing information, start or stop Pods, or create new resources. - -### Billing role - -The billing role focuses exclusively on financial management aspects of the account. - -Users with this role can access all billing information, manage payment methods, and view invoices. They cannot access computing resources, making this role ideal for finance team members who need billing access without operational permissions. - -### Dev role - -The dev role extends basic permissions with additional capabilities for active development work. - -This role includes all basic permissions plus the ability to start, stop, and create Pods. Developers can fully manage computing resources for their work while remaining restricted from billing information and account settings. - -### Admin role - -The admin role provides complete control over all account features and settings. - -Administrators have unrestricted access to manage team members, configure account settings, handle billing, and control all team computing resources. This role should be reserved for team leaders and trusted members who need full account access. - -## Account spend limits - -By default, Runpod accounts have a spend limit of \$80 per hour across all resources. This limit protects your account from unexpected charges. If your workload requires higher spending capacity, you can [contact support](https://www.runpod.io/contact) to increase it. - -## Monitor account activity - -Runpod provides comprehensive audit logs to track all actions performed within your account. This feature helps maintain security and accountability across team operations. - -Access audit logs at [console.runpod.io/user/audit-logs](https://www.console.runpod.io/user/audit-logs). - -The audit system records detailed information about each action, including the user who performed it, the affected resource, and the timestamp. You can filter logs by date range, user, resource type, resource ID, and specific actions to investigate account activity or troubleshoot issues. - -Regular review of audit logs helps identify unusual activity and ensures team members use resources appropriately. - -## Best practices - -When managing team accounts, establish clear role assignments based on each member's responsibilities. Regularly review team membership and remove access for members who no longer need it. - -For enhanced security, use the principle of least privilege by assigning the minimum role necessary for each team member's work. Consider creating separate accounts for billing management to isolate financial access from technical operations. - -Monitor audit logs periodically to ensure compliance with your organization's policies and identify any unauthorized activities early. diff --git a/pods/storage/create-network-volumes.mdx b/pods/storage/create-network-volumes.mdx deleted file mode 100644 index 6e4e42d34..000000000 --- a/pods/storage/create-network-volumes.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: "Network volumes for Pods" -sidebarTitle: "Network volumes" -description: "Persistent, portable storage for Pods." ---- - -Network volumes offer persistent storage that exists independently of the lifecycle of a Pod. This means your data is retained even if a Pod is terminated. They can be attached to multiple Pods, making them ideal for sharing data, transferring storage between machines, or maintaining datasets. - -When attached to a Pod, a network volume replaces the Pod's default volume disk and is typically mounted at ` /workspace`. - -For a comparison with other storage types, see [Storage options](/pods/storage/types). - - - -If your account lacks sufficient funds to cover storage costs, your network volume may be terminated. Once terminated, the disk space is immediately freed for other users, and Runpod cannot recover lost data. Ensure your account remains funded to prevent data loss. - - - -## When to use a network volume - -Consider using a network volume when you need: - -* **Persistent data that outlives individual Pods:** Keep your data safe and accessible even after a Pod is terminated. -* **Shareable storage:** Share data across multiple Pods by attaching the same network volume. -* **Portable storage:** Easily move your working environment and data to a different Pod, perhaps in a different GPU pool if your preferred option isn't available. -* **Efficient data management:** Store frequently used models or large datasets to avoid re-downloading them for each new Pod, saving time and bandwidth. - - - - Network volumes are only available for Pods in the Secure Cloud. For more information, see [Pod types](/pods/overview#pod-types). - - - -## Create a network volume - - - -To create a new network volume: - -1. Navigate to the [Storage page](https://www.console.runpod.io/user/storage) in the Runpod console. -2. Select **New Network Volume**. -3. **Configure your volume:** - * Select a datacenter for your volume. Datacenter location does not affect pricing, but the datacenter location will determine which GPU types your network volume can be used with. - * Provide a descriptive name for your volume (e.g., "project-alpha-data" or "stable-diffusion-models"). - * Specify the desired size for the volume in gigabytes (GB). - - - - Network volume size can be increased later, but cannot be decreased. - - - -4. Select **Create Network Volume**. - -You can edit and delete your network volumes using the [Storage page](https://www.console.runpod.io/user/storage). - - - - -To create a network volume using the REST API, send a POST request to the `/networkvolumes` endpoint: - -**Create a network volume:** -```bash -curl --request POST \ - --url https://rest.runpod.io/v1/networkvolumes \ - --header 'Authorization: Bearer RUNPOD_API_KEY' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "my-network-volume", - "size": 50, - "dataCenterId": "US-KS-2" -}' -``` - -For complete API documentation and parameter details, see the [network volumes API reference](/api-reference/network-volumes/POST/networkvolumes). - - - - - -## Attach a network volume to a Pod - - - -Network volumes must be attached during Pod deployment. They cannot be attached to a previously-deployed Pod, nor can they be unattached later without deleting the Pod. - - - -To deploy a Pod with a network volume attached: - -1. Navigate to the [Pods page](https://www.console.runpod.io/pods). -2. Select **Deploy**. -3. Select **Network Volume** and select the network volume you want to attach to the Pod from the dropdown list. -4. Select a GPU type. The system will automatically tell you which Pods are available to use with the selected network volume. -5. Select a **Pod Template**. -5. If you wish to change where the volume mounts, select **Edit Template** and adjust the **Volume Mount Path**. -4. Configure any other fields as you normally would, then select **Deploy On-Demand**. - -Data from the network volume will be accessible to the Pod from the volume mount path, which is set to `/workspace` by default. Use this directory to upload, download, and manipulate data, and share it with other Pods. - -## Share data between Pods - -You can attach a network volume to multiple Pods, allowing them to share data seamlessly. Multiple Pods can read files from the same volume concurrently, but you should avoid writing to the same file simultaneously to prevent conflicts or data corruption. - -## S3-compatible API - -Runpod provides an S3-compatible API that allows you to access and manage files on your network volumes directly, without needing to launch a Pod. This can be particularly useful for: - -- **Uploading large datasets or models** before launching your Pod. -- **Managing files remotely** without maintaining an active Pod connection. -- **Automating data workflows** using standard S3 tools and libraries. -- **Reducing costs** by avoiding the need to keep Pods running for file management. - -The S3-compatible API supports standard S3 operations including file uploads, downloads, listing, and deletion. You can use it with popular tools like the AWS CLI and Boto3 (Python). - -For detailed setup instructions, authentication, and usage examples, see the [S3-compatible API documentation](/storage/s3-api). - - -The S3-compatible API is currently available for network volumes in the following datacenters: `EUR-IS-1`, `EU-RO-1`, `EU-CZ-1`, `US-KS-2`, `US-CA-2`. - - -## Architecture details - -Network volumes are backed by high-performance storage servers co-located with Runpod GPU servers. These are connected via high-speed networks and use NVMe SSDs for optimal performance, but data transfer speeds can vary widely based on location and network conditions (200-400MB/s, up to 10GB/s). - -## Benefits - -Using network volumes provides significant flexibility that can lead to cost savings, especially if you need to frequently switch between Pods or share large datasets. - -Network volume storage space costs less than for volume disks (\$0.07/GB/month rather than \$0.10/GB/month), and storing data on a network volume can save you money compared to provisioning separate disk space for multiple Pods (even with just two Pods sharing one volume). - -For a deeper dive into potential benefits, read this [blog article on network volumes](https://www.runpod.io/blog/network-volumes-on-runpod-secure-cloud). - -## Migrate files between volumes - -You can migrate files from one network volume to another using `runpodctl send` and `receive` on two running Pods. Watch this video tutorial for a step-by-step walkthrough: - - - - \ No newline at end of file diff --git a/references/billing-information.mdx b/references/billing-information.mdx deleted file mode 100644 index bd0a97929..000000000 --- a/references/billing-information.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "Billing information" -description: "Understand how billing works for Pods, storage, network volumes, refunds, and spending limits." ---- - -import { MachineTooltip } from "/snippets/tooltips.jsx"; - -All billing, including per-hour compute and storage billing, is charged per minute. - -## How billing works - -Every Pod has an hourly cost based on [GPU type](/references/gpu-types). Your Runpod credits are charged every minute the Pod is running. If you run out of credits, your Pods are automatically stopped and you'll receive an email notification. Pods are eventually terminated if you don't refill your credits. - - -Runpod automatically stops all your Pods when your account balance reaches \$0. A Pod with a network volume attached is stopped, and its data is preserved on the volume. A Pod without a network volume is terminated, and its data cannot be recovered. Storage charges continue to accrue on network volumes while Pods are stopped, so if your balance stays at \$0 and these charges can't be covered, the network volume may eventually be terminated and its data cannot be recovered. To avoid service interruptions, enable [low balance notifications](/accounts-billing/billing#low-balance-notifications) or set up [auto-pay](https://www.console.runpod.io/user/billing). - - -You must have at least one hour's worth of runtime in your balance to rent a Pod at your given spec. If your balance is insufficient, consider depositing additional funds or lowering your GPU spec requirements. - -## Storage billing - -Storage billing varies depending on Pod state. Running Pods are charged \$0.10 per GB per month for all storage, while stopped Pods are charged \$0.20 per GB per month for volume storage. - -Storage is charged per minute. You are not charged for storage if the host is down or unavailable from the public internet. - -## Network volume billing - -Network volumes are billed hourly based on storage size. For storage below 1TB, you'll pay \$0.07 per GB per month. Above 1TB, the rate drops to \$0.05 per GB per month. - -Network volumes are hosted on storage servers located in the same datacenters where you rent GPU servers. These servers are connected via a high-speed local network (25Gbps to 200Gbps depending on location) and use NVME SSDs for storage. - - -If your machine-based storage or network volume is terminated due to lack of funds, that disk space is immediately freed up for use by other clients. Runpod cannot assist in recovering lost storage. Runpod is not designed as a cloud storage system—storage is provided to support running tasks on GPUs. Back up critical data regularly to your local machine or a dedicated cloud storage provider. - - -## Refunds and withdrawals - -Runpod does not offer the option to withdraw your unused balance after depositing funds. When you add funds to your Runpod account, credits are non-refundable and can only be used for Runpod services. Only deposit the amount you intend to use. - -If you aren't sure if Runpod is right for you, you can load as little as \$10 into your account to try things out. Visit the [Discord community](https://discord.com/invite/pJ3P2DbUUq) to ask questions or email [help@runpod.io](mailto:help@runpod.io). Refunds and trial credits are not currently offered due to processing overhead. - -If you have questions about billing or need assistance planning your Runpod expenses, contact support at [help@runpod.io](mailto:help@runpod.io). - -## Spending limits - -Spending limits are implemented for newer accounts to prevent fraud. These limits grow over time and should not impact normal usage. If you need an increased spending limit, [contact support](https://www.runpod.io/contact) and share your use case. - -### Payment methods - -Runpod accepts several payment methods for funding your account: - -1. **Credit Card**: You can use your credit card to fund your Runpod account. However, be aware that card declines are more common than you might think, and the reasons for them might not always be clear. If you're using a prepaid card, it's recommended to deposit in transactions of at least \$100 to avoid unexpected blocks due to Stripe's minimums for prepaid cards. For more information, review [cards accepted by Stripe](https://docs.stripe.com/payments/cards). - -2) **Crypto Payments**: Runpod also accepts crypto payments. It's recommended to set up a [crypto.com](https://crypto.com/?ref=blog.runpod.io) account and go through any KYC checks they may require ahead of time. This provides an alternate way of funding your account in case you run into issues with card payment. - -3. **Business Invoicing**: For large transactions (over \$5,000), Runpod offers business invoicing through ACH, credit card, and local and international wire transfers. - -If you're having trouble with your card payments, you can contact [Runpod support](https://www.runpod.io/contact) for assistance. diff --git a/references/referrals.mdx b/references/referrals.mdx deleted file mode 100644 index 513dfcaac..000000000 --- a/references/referrals.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "Referral, affiliate, and creator programs" -sidebarTitle: "Referral programs" -description: "Earn additional revenue through Runpod's referral, affiliate, and creator programs" ---- - -Runpod offers three programs that help you earn additional revenue while helping us grow our community. Whether you're referring new users, creating popular templates, or driving significant traffic, there's a program that fits your contribution style. - -## Runpod referral program - -Earn Runpod Credits when users you refer spend on Serverless or Pods. The referral program rewards both you and the person you refer, creating a win-win situation for everyone involved. - -### How rewards work - -When someone signs up using your referral link and starts spending on Runpod, you earn a percentage of their spend as Runpod Credits: - -- **5% commission** on all Serverless spend for the first 6 months. -- **3% commission** on all Pod spend for the first 6 months. -- **Bonus credits** for both you and your referral after they load \$10 on their account. The bonus amount depends on your location: - - **Non-European customers** receive a random weighted bonus between \$5 and \$500. - - **European customers** receive a fixed \$5 bonus. - - **Cross-region referrals**: If a European customer refers a non-European customer, the European customer receives \$5 and the non-European customer receives the random weighted bonus (\$5-\$500). If a non-European customer refers a European customer, the non-European customer receives the random weighted bonus and the European customer receives \$5. - -If you referred users before June 16, 2025, you're part of our beta program group. This means you'll continue earning commissions on their spend indefinitely, not just for 6 months. - -## Runpod affiliate program - -The affiliate program is designed for high-performing referrers who want to earn cash instead of credits. Through our partnership with Partnerstack, eligible referrers can earn 10% cash commissions on all referral spend. - -### Eligibility and rewards - -To qualify for the affiliate program, you need to have referred at least 25 paying users through the standard referral program. Once eligible, you can choose to upgrade to the affiliate program, which offers: - -- **10% cash commission** on all referral spend for the first 6 months. -- Professional tracking and reporting through Partnerstack. -- Direct cash payments instead of Runpod Credits. - -Once you opt into the affiliate program, this decision is permanent. Choose carefully based on whether you prefer cash payments or Runpod Credits. - -For beta program participants (users referred before June 26, 2025), a special arrangement applies. These users will be eligible for Partnerstack commissions during their first 6 months. After that period, they'll return to the standard referral program but continue generating commissions indefinitely. - -## Runpod creator program - -The creator program rewards users who build popular [Pod templates](/pods/templates/overview) that others use on the platform. Every time someone runs a Pod using your template, you earn a percentage of their spend. - -### How it works - -Template creators earn **1% in Runpod Credits** for every dollar spent using their templates. This creates a passive income stream that grows with your template's popularity. - -For example, if 20 users run Pods using your template at \$0.54/hour for a full week, you'll earn \$18.14 in credits. The more useful and popular your template, the more you can earn. - -### Getting started with templates - -To participate in the creator program, your template must accumulate at least 1 day of total runtime across all users. Focus on creating templates that solve real problems or make it easier for users to get started with specific workloads. - -## How to participate - -Getting started with any of these programs is straightforward: - -1. Navigate to your [referral dashboard](https://www.console.runpod.io/user/referrals) in the Runpod console. -2. Find your unique referral link (it will look something like `https://runpod.io?ref=5t99c9je`). -3. Share this link with potential users through your preferred channels. - -For the creator program, simply publish templates through your Runpod account and promote them to potential users. - -## Important details - -Understanding how these programs work will help you maximize your earnings: - -1. **Referral commissions are based on actual usage, not purchases.** If someone you refer buys \$1,000 in credits, you won't earn commission until they actually use those credits on Pods or Serverless workloads. -2. **New accounts only.** Referral links only work for brand new Runpod users. If someone already has an account, referring them won't generate commissions. -3. **Bonus credit distribution varies by location.** Non-European customers receive credits through a weighted random system between \$5 and \$500, while European customers receive a fixed \$5 bonus. For non-European customers, most will receive a bonus of \$5, with about 96% receiving \$10 or less. - -## Support - -Have questions about maximizing your earnings or need help with any of these programs? [Contact our support team](https://contact.runpod.io/hc/en-us/requests/new) for assistance. - -Remember, if you're transitioning to the affiliate program, you'll keep all earnings accumulated through the referral program before making the switch. \ No newline at end of file diff --git a/scripts/validate-redirect-sources.js b/scripts/validate-redirect-sources.js new file mode 100644 index 000000000..350162dee --- /dev/null +++ b/scripts/validate-redirect-sources.js @@ -0,0 +1,62 @@ +#!/usr/bin/env node + +const fs = require("fs"); +const path = require("path"); + +const root = path.resolve(__dirname, ".."); +const config = JSON.parse(fs.readFileSync(path.join(root, "docs.json"), "utf8")); +const ignoredDirectories = new Set([".git", "node_modules", "snippets"]); + +function collectPageRoutes(directory, routes = []) { + for (const entry of fs.readdirSync(directory, { withFileTypes: true })) { + if (entry.isDirectory() && ignoredDirectories.has(entry.name)) continue; + + const absolutePath = path.join(directory, entry.name); + if (entry.isDirectory()) { + collectPageRoutes(absolutePath, routes); + continue; + } + + if (!entry.name.endsWith(".md") && !entry.name.endsWith(".mdx")) continue; + + const relativePath = path.relative(root, absolutePath).replaceAll(path.sep, "/"); + routes.push(`/${relativePath.replace(/\.mdx?$/, "")}`); + } + + return routes; +} + +function redirectPattern(source) { + let pattern = source.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + pattern = pattern.replace(/:[A-Za-z0-9_]+\\\*/g, ".*"); + pattern = pattern.replace(/:[A-Za-z0-9_]+/g, "[^/]+"); + pattern = pattern.replace(/\\\*/g, ".*"); + return new RegExp(`^${pattern}$`); +} + +const redirects = (config.redirects || []).map(({ source, destination }) => ({ + source, + destination, + pattern: redirectPattern(source), +})); + +const collisions = []; +for (const route of collectPageRoutes(root)) { + for (const redirect of redirects) { + if (redirect.pattern.test(route)) { + collisions.push({ route, source: redirect.source, destination: redirect.destination }); + } + } +} + +if (collisions.length > 0) { + console.error("Redirect source files can be emitted in the generated sitemap:"); + for (const collision of collisions) { + console.error( + `- ${collision.route} matches ${collision.source} -> ${collision.destination}`, + ); + } + process.exit(1); +} + +console.log(`Validated ${redirects.length} redirects: no redirect source files found.`); diff --git a/sdks/go/endpoints.mdx b/sdks/go/endpoints.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/go/overview.mdx b/sdks/go/overview.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/javascript/endpoints.mdx b/sdks/javascript/endpoints.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/javascript/overview.mdx b/sdks/javascript/overview.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/python/apis.mdx b/sdks/python/apis.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/python/endpoints.mdx b/sdks/python/endpoints.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdks/python/overview.mdx b/sdks/python/overview.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/serverless/endpoints/operations.mdx b/serverless/endpoints/operations.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/aggregate.mdx b/tutorials/sdks/python/101/aggregate.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/async.mdx b/tutorials/sdks/python/101/async.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/error.mdx b/tutorials/sdks/python/101/error.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/generator.mdx b/tutorials/sdks/python/101/generator.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/hello.mdx b/tutorials/sdks/python/101/hello.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/101/local-server-testing.mdx b/tutorials/sdks/python/101/local-server-testing.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/102/huggingface-models.mdx b/tutorials/sdks/python/102/huggingface-models.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/102/stable-diffusion-text-to-image.mdx b/tutorials/sdks/python/102/stable-diffusion-text-to-image.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/get-started/hello-world.mdx b/tutorials/sdks/python/get-started/hello-world.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/get-started/introduction.mdx b/tutorials/sdks/python/get-started/introduction.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/get-started/prerequisites.mdx b/tutorials/sdks/python/get-started/prerequisites.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/tutorials/sdks/python/get-started/running-locally.mdx b/tutorials/sdks/python/get-started/running-locally.mdx deleted file mode 100644 index e69de29bb..000000000