mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-04 17:08:47 +08:00
docs: 引入 Fumadocs
ci: set up github actions
This commit is contained in:
13
docs/mdx-components.tsx
Normal file
13
docs/mdx-components.tsx
Normal 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)} />,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user