docs: 引入 Fumadocs

ci: set up github actions
This commit is contained in:
Palm Civet
2025-09-05 20:00:05 +08:00
parent f89a17f14d
commit 29232afadc
32 changed files with 1422 additions and 4 deletions

13
docs/mdx-components.tsx Normal file
View File

@@ -0,0 +1,13 @@
import defaultMdxComponents from 'fumadocs-ui/mdx';
import type { MDXComponents } from 'mdx/types';
import { APIPage } from 'fumadocs-openapi/ui';
import { openapi } from '@/lib/openapi';
// use this function to get MDX components, you will need it for rendering MDX
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultMdxComponents,
...components,
APIPage: (props) => <APIPage {...openapi.getAPIPageProps(props)} />,
};
}