mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
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.
33 lines
709 B
JavaScript
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);
|