Files
sofa/docs/next.config.mjs
T
jake fe81a541b4 refactor(docs): split grouped API reference pages into per-procedure MDX files
Replace the single MDX file per API tag (e.g. `admin.mdx`, `titles.mdx`) with individual files for each procedure (e.g. `admin/admin.backups.create.mdx`). Each file renders a single `<APIPage>` with one operation, includes an inline description, and carries its own `_openapi` frontmatter.

Update `generate-api-docs.ts` to emit this per-procedure structure and adjust `source.ts` and `next.config.mjs` to resolve the new paths correctly.
2026-03-15 11:02:58 -04:00

33 lines
709 B
JavaScript

import { createMDX } from "fumadocs-mdx/next";
const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
serverExternalPackages: ["@takumi-rs/image-response"],
reactStrictMode: true,
turbopack: {
// docs site is essentially self-contained from the rest of the monorepo
root: import.meta.dirname,
},
async redirects() {
return [
{
source: "/docs/api",
destination: "/docs/api/account/account.removeAvatar",
permanent: false,
},
];
},
async rewrites() {
return [
{
source: "/docs/:path*.mdx",
destination: "/llms.mdx/docs/:path*",
},
];
},
};
export default withMDX(config);