mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 04:19:26 +00:00
wip
This commit is contained in:
@@ -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]" />
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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({});
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
6
docs/scripts/generate-docs.mjs
Normal file
6
docs/scripts/generate-docs.mjs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { generateFiles } from 'fumadocs-openapi';
|
||||||
|
|
||||||
|
void generateFiles({
|
||||||
|
input: ['./open-api.yaml'], // the OpenAPI schemas
|
||||||
|
output: './content/docs/api',
|
||||||
|
});
|
||||||
@@ -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
511
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user