Files
wehub-resource-sync 91e75e620b
CI: cua-driver distro-compat matrix / Resolve release version (push) Waiting to run
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / Distro compat summary (push) Blocked by required conditions
CI: Nix Linux Rust source / Nix / compositor build (push) Waiting to run
CI: Nix Linux Rust source / Nix / driver package (push) Waiting to run
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Waiting to run
CI: Rust Linux unit / Rust Linux unit and compile (push) Waiting to run
CI: Rust Windows unit / Rust Windows unit and compile (push) Waiting to run
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Waiting to run
CD: Docs MCP Server / build (linux/amd64) (push) Waiting to run
CD: Docs MCP Server / build (linux/arm64) (push) Waiting to run
CD: Docs MCP Server / merge (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 13:03:19 +08:00

217 lines
5.7 KiB
JavaScript

import { createMDX } from 'fumadocs-mdx/next';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const withMDX = createMDX();
const docsRoot = dirname(fileURLToPath(import.meta.url));
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
turbopack: {
root: docsRoot,
},
trailingSlash: false,
basePath: '/docs',
assetPrefix: '/docs',
async rewrites() {
return [
{
source: '/:path*.mdx',
destination: '/llms.mdx/:path*',
},
];
},
async redirects() {
return [
{
source: '/',
destination: '/docs',
basePath: false, // Important: this bypasses the basePath
permanent: false,
},
// Redirect old docs.cua.ai URLs to cua.ai/docs with 301 for SEO
// This handles URLs that Google has indexed from the old domain
{
source: '/:path*',
has: [
{
type: 'host',
value: 'docs.cua.ai',
},
],
destination: 'https://cua.ai/docs/:path*',
permanent: true, // 301 redirect to preserve SEO authority
basePath: false,
},
// Redirects for old URLs
{
source: '/quickstart-devs',
destination: '/get-started/quickstart',
permanent: true,
},
{
source: '/quickstart-cli',
destination: '/get-started/quickstart',
permanent: true,
},
// Redirect old /api URLs to SDK landing pages
{
source: '/cua/reference/computer-sdk/api',
destination: '/cua/reference/computer-sdk',
permanent: true,
},
{
source: '/cua/reference/agent-sdk/api',
destination: '/cua/reference/agent-sdk',
permanent: true,
},
{
source: '/reference/cua-driver/modality-test-suite',
destination: '/reference/cua-driver/limits',
permanent: true,
},
{
source: '/reference/cua-driver/modality-test-suite.mdx',
destination: '/reference/cua-driver/limits',
permanent: true,
},
{
source: '/explanation/linux-and-wayland',
destination: '/reference/cua-driver/limits',
permanent: true,
},
{
source: '/explanation/linux-and-wayland.mdx',
destination: '/reference/cua-driver/limits',
permanent: true,
},
{
source: '/explanation/capture-and-dispatch-modalities',
destination: '/concepts/capture-and-delivery-modalities',
permanent: true,
},
{
source: '/explanation/capture-and-dispatch-modalities.mdx',
destination: '/concepts/capture-and-delivery-modalities',
permanent: true,
},
{
source: '/explanation/demonstrations-skills-and-trajectories',
destination: '/concepts',
permanent: true,
},
{
source: '/explanation/demonstrations-skills-and-trajectories.mdx',
destination: '/concepts',
permanent: true,
},
{
source: '/explanation/process-model',
destination: '/reference/cua-driver/process-model',
permanent: true,
},
{
source: '/explanation/process-model.mdx',
destination: '/reference/cua-driver/process-model',
permanent: true,
},
{
source: '/concepts/process-model',
destination: '/reference/cua-driver/process-model',
permanent: true,
},
{
source: '/concepts/process-model.mdx',
destination: '/reference/cua-driver/process-model',
permanent: true,
},
{
source: '/explanation/architecture',
destination: '/concepts',
permanent: true,
},
{
source: '/explanation/architecture.mdx',
destination: '/concepts',
permanent: true,
},
{
source: '/concepts/architecture',
destination: '/concepts',
permanent: true,
},
{
source: '/concepts/architecture.mdx',
destination: '/concepts',
permanent: true,
},
{
source: '/concepts/how-cua-fits-together',
destination: '/concepts',
permanent: true,
},
{
source: '/concepts/how-cua-fits-together.mdx',
destination: '/concepts',
permanent: true,
},
{
source: '/how-to-guides/driver/choose-a-modality',
destination: '/reference/cua-driver/action-selection-policy',
permanent: true,
},
{
source: '/how-to-guides/driver/choose-a-modality.mdx',
destination: '/reference/cua-driver/action-selection-policy',
permanent: true,
},
{
source: '/explanation',
destination: '/concepts',
permanent: true,
},
{
source: '/explanation.mdx',
destination: '/concepts',
permanent: true,
},
{
source: '/explanation/:path*.mdx',
destination: '/concepts/:path*',
permanent: true,
},
{
source: '/explanation/:path*',
destination: '/concepts/:path*',
permanent: true,
},
{
source: '/tutorials/run-an-agent-in-a-sandbox',
destination: '/tutorials/your-first-cloud-sandbox',
permanent: true,
},
{
source: '/tutorials/run-an-agent-in-a-sandbox.mdx',
destination: '/tutorials/your-first-cloud-sandbox',
permanent: true,
},
];
},
images: {
dangerouslyAllowSVG: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'img.shields.io',
},
{
protocol: 'https',
hostname: 'github.com',
},
],
},
};
export default withMDX(config);