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

View File

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

View File

@@ -6,6 +6,7 @@
"build": "next build", "build": "next build",
"dev": "next dev", "dev": "next dev",
"start": "next start", "start": "next start",
"build:docs": "node ./scripts/generate-docs.mjs",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"postinstall": "fumadocs-mdx" "postinstall": "fumadocs-mdx"
}, },
@@ -56,9 +57,11 @@
"date-fns": "^3.6.0", "date-fns": "^3.6.0",
"embla-carousel-react": "^8.2.0", "embla-carousel-react": "^8.2.0",
"framer-motion": "^11.3.30", "framer-motion": "^11.3.30",
"fumadocs": "^0.0.0",
"fumadocs-core": "14.0.2", "fumadocs-core": "14.0.2",
"fumadocs-docgen": "^1.1.0", "fumadocs-docgen": "^1.1.0",
"fumadocs-mdx": "11.1.0", "fumadocs-mdx": "11.1.0",
"fumadocs-openapi": "^5.7.3",
"fumadocs-twoslash": "^1.1.2", "fumadocs-twoslash": "^1.1.2",
"fumadocs-typescript": "^3.0.2", "fumadocs-typescript": "^3.0.2",
"fumadocs-ui": "14.0.2", "fumadocs-ui": "14.0.2",
@@ -81,6 +84,7 @@
"recharts": "^2.12.7", "recharts": "^2.12.7",
"rehype-mermaid": "^2.1.0", "rehype-mermaid": "^2.1.0",
"remark-codesandbox": "^0.10.1", "remark-codesandbox": "^0.10.1",
"shiki": "^1.23.1",
"sonner": "^1.5.0", "sonner": "^1.5.0",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7", "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}", "./app/**/*.{ts,tsx}",
"./content/**/*.{md,mdx}", "./content/**/*.{md,mdx}",
"../node_modules/fumadocs-ui/dist/**/*.js", "../node_modules/fumadocs-ui/dist/**/*.js",
'../node_modules/fumadocs-openapi/dist/**/*.js',
], ],
presets: [ presets: [
createPreset({ createPreset({

511
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff