This commit is contained in:
Bereket Engida
2024-11-21 22:54:01 +03:00
parent 3d8d560420
commit 8c0e2fcada
6 changed files with 522 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ import { ForkButton } from "@/components/fork-button";
import Link from "next/link";
import defaultMdxComponents from "fumadocs-ui/mdx";
import { AutoTypeTable } from "fumadocs-typescript/ui";
import { openapi } from '@/app/source';
export default async function Page({
params,
@@ -73,6 +74,7 @@ export default async function Page({
Features,
ForkButton,
DatabaseTable,
APIPage: openapi.APIPage,
iframe: (props) => (
<iframe {...props} className="w-full h-[500px]" />
),

View File

@@ -1,6 +1,7 @@
import { docs, meta, changelog as _changelog } from "@/.source";
import { createMDXSource } from "fumadocs-mdx";
import { loader } from "fumadocs-core/source";
import { createOpenAPI } from "fumadocs-openapi/server";
export const source = loader({
baseUrl: "/docs",
@@ -11,3 +12,5 @@ export const changelog = loader({
baseUrl: "/changelog",
source: createMDXSource(_changelog, meta),
});
export const openapi = createOpenAPI({});

View File

@@ -6,6 +6,7 @@
"build": "next build",
"dev": "next dev",
"start": "next start",
"build:docs": "node ./scripts/generate-docs.mjs",
"typecheck": "tsc --noEmit",
"postinstall": "fumadocs-mdx"
},
@@ -56,9 +57,11 @@
"date-fns": "^3.6.0",
"embla-carousel-react": "^8.2.0",
"framer-motion": "^11.3.30",
"fumadocs": "^0.0.0",
"fumadocs-core": "14.0.2",
"fumadocs-docgen": "^1.1.0",
"fumadocs-mdx": "11.1.0",
"fumadocs-openapi": "^5.7.3",
"fumadocs-twoslash": "^1.1.2",
"fumadocs-typescript": "^3.0.2",
"fumadocs-ui": "14.0.2",
@@ -81,6 +84,7 @@
"recharts": "^2.12.7",
"rehype-mermaid": "^2.1.0",
"remark-codesandbox": "^0.10.1",
"shiki": "^1.23.1",
"sonner": "^1.5.0",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",

View File

@@ -0,0 +1,6 @@
import { generateFiles } from 'fumadocs-openapi';
void generateFiles({
input: ['./open-api.yaml'], // the OpenAPI schemas
output: './content/docs/api',
});

View File

@@ -15,6 +15,7 @@ export default {
"./app/**/*.{ts,tsx}",
"./content/**/*.{md,mdx}",
"../node_modules/fumadocs-ui/dist/**/*.js",
'../node_modules/fumadocs-openapi/dist/**/*.js',
],
presets: [
createPreset({

511
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff