diff --git a/app/(docs)/[[...slug]]/page.tsx b/app/(docs)/[[...slug]]/page.tsx
index 5402557..5cf9096 100644
--- a/app/(docs)/[[...slug]]/page.tsx
+++ b/app/(docs)/[[...slug]]/page.tsx
@@ -1,12 +1,13 @@
+import { APIPage } from '@/components/openapi/api-page';
import { source } from '@/lib/source';
import { getMDXComponents } from '@/mdx-components';
-import { createRelativeLink } from 'fumadocs-ui/mdx';
import {
DocsBody,
DocsDescription,
DocsPage,
DocsTitle,
-} from 'fumadocs-ui/page';
+} from 'fumadocs-ui/layouts/notebook/page';
+import { createRelativeLink } from 'fumadocs-ui/mdx';
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
@@ -15,15 +16,27 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) {
const page = source.getPage(params.slug);
if (!page) notFound();
+ if (page.data.type === 'openapi') {
+ return (
+
+ {page.data.title}
+ {page.data.description}
+
+
+
+
+ );
+ }
+
const MDX = page.data.body;
return (
- {page.data.title}
+ {page.data.pageTitle || page.data.title}
{page.data.description}
+ props: PageProps<'/[[...slug]]'>,
): Promise {
const params = await props.params;
const page = source.getPage(params.slug);
if (!page) notFound();
+ if (page.data.type === 'openapi') {
+ return {
+ title: page.data.title,
+ description: page.data.description,
+ };
+ }
+
return {
- title: page.data.title,
+ title: page.data.pageTitle || page.data.title,
description: page.data.description,
};
}
diff --git a/app/global.css b/app/global.css
index f87c793..a690e9e 100644
--- a/app/global.css
+++ b/app/global.css
@@ -29,8 +29,6 @@
#nd-subnav {
> div {
- @apply border-b-0! h-16!;
+ @apply border-b-0!;
}
-
- @apply layout:[--fd-header-height:64px]!;
}
diff --git a/app/llms-full.txt/route.ts b/app/llms-full.txt/route.ts
index 463111c..4238a65 100644
--- a/app/llms-full.txt/route.ts
+++ b/app/llms-full.txt/route.ts
@@ -3,8 +3,15 @@ import { getLlmText, source } from '@/lib/source';
export const revalidate = false;
export async function GET() {
- const scan = source.getPages().map(getLlmText);
- const scanned = await Promise.all(scan);
+ const pages = source.getPages();
+ const scanned = (await Promise.all(pages.map(getLlmText))).filter(Boolean);
- return new Response(scanned.join('\n\n'));
+ const openapiPage = pages.find((page) => page.data.type === 'openapi');
+ if (openapiPage && openapiPage.data.type === 'openapi') {
+ scanned.push(`# OpenAPI Specification
+
+${JSON.stringify(openapiPage.data.getSchema().bundled, null, 2)}`);
+ }
+
+ return new Response(scanned.join('\n\n\n'));
}
diff --git a/components/page-select.tsx b/components/card-link-select.tsx
similarity index 72%
rename from components/page-select.tsx
rename to components/card-link-select.tsx
index 61d4601..cd7dfaf 100644
--- a/components/page-select.tsx
+++ b/components/card-link-select.tsx
@@ -1,10 +1,10 @@
'use client';
+import { cn } from '@/lib/utils';
import Link from 'fumadocs-core/link';
-import { cn } from 'fumadocs-ui/utils/cn';
import { usePathname } from 'next/navigation';
-type PageSelectProps = {
+type CardLinkSelectProps = {
pages: {
href: string;
title: string;
@@ -12,7 +12,7 @@ type PageSelectProps = {
}[];
};
-export function PageSelect({ pages }: PageSelectProps) {
+export function CardLinkSelect({ pages }: CardLinkSelectProps) {
const pathname = usePathname();
return (
@@ -26,9 +26,11 @@ export function PageSelect({ pages }: PageSelectProps) {
href={page.href}
data-card
className={cn(
- 'bg-fd-card/80 text-fd-card-foreground hover:bg-fd-accent/70 @max-lg:col-span-full block rounded-xl border p-4 shadow-md transition-colors',
- active &&
- 'bg-fd-primary/10 border-fd-primary/70 hover:bg-fd-primary/10'
+ 'bg-fd-card text-fd-card-foreground hover:bg-fd-accent/60 @max-lg:col-span-full block rounded-xl border p-4 shadow-md transition-colors',
+ {
+ 'bg-fd-primary/10 border-fd-primary/70 hover:bg-fd-primary/10':
+ active,
+ },
)}
>
{page.title}
diff --git a/components/icons.tsx b/components/icons.tsx
new file mode 100644
index 0000000..b83f26d
--- /dev/null
+++ b/components/icons.tsx
@@ -0,0 +1,50 @@
+export function StripeIcon() {
+ return (
+
+
+
+ );
+}
+
+export function LemonSqueezyIcon() {
+ return (
+
+
+
+ );
+}
+
+export function PolarIcon() {
+ return (
+
+ {' '}
+
+
+ );
+}
diff --git a/components/mdx/license-token.mdx b/components/mdx/license-token.mdx
index 8a805bb..91da86d 100644
--- a/components/mdx/license-token.mdx
+++ b/components/mdx/license-token.mdx
@@ -13,7 +13,7 @@ To make this possible, Keyforge can issue a signed **license token** that is ver
There is a client SDK available for JavaScript, but license tokens can be used in any programming language that supports JWTs.
-