mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
Merges upstream commits a57b2646..159300157 from fuma-nama/fumadocs dev branch, including: - Core/UI/Base-UI version bump 16.5.3 -> 16.6.5 - OpenAPI version bump 10.3.4 -> 10.3.9 (3.2 support, server selector) - TypeScript version bump 5.1.3 -> 5.1.4 (tag parser, type table ID) - Markdown search improvements (inline elements, codeblocks, Vietnamese) - CSS performance improvements and accessibility fixes - MDX stringification using mdast-util-to-markdown - Sidebar active link items support - Mixedbread search moved to server-side - Tailwind CSS plugin forwarding for module resolution - Cursor integration replacing T3 Chat in templates - Template cleanup (removed deprecated mdx-remote example) All fumadocs-* packages renamed to @hanzo/docs-* namespace. Removed duplicate +next+fuma-docs-mdx templates (using hanzo-docs-mdx). Upstream metadata (homepage, repository) updated to Hanzo.
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import type { Route } from './+types/docs';
|
|
import { DocsLayout } from '@hanzo/docs-ui/layouts/docs';
|
|
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from '@hanzo/docs-ui/layouts/docs/page';
|
|
import { source } from '@/lib/source';
|
|
import defaultMdxComponents from '@hanzo/docs-ui/mdx';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
|
|
export function ServerComponent({ params }: Route.ComponentProps) {
|
|
const slugs = params['*'].split('/').filter((v) => v.length > 0);
|
|
const page = source.getPage(slugs);
|
|
if (!page) throw new Response('Not found', { status: 404 });
|
|
|
|
const { body: MDX } = page.data;
|
|
|
|
return (
|
|
<DocsLayout {...baseOptions()} tree={source.getPageTree()}>
|
|
<DocsPage toc={page.data.toc}>
|
|
<title>{page.data.title}</title>
|
|
<meta name="description" content={page.data.description} />
|
|
<DocsTitle>{page.data.title}</DocsTitle>
|
|
<DocsDescription>{page.data.description}</DocsDescription>
|
|
<DocsBody>
|
|
<MDX components={{ ...defaultMdxComponents }} />
|
|
</DocsBody>
|
|
</DocsPage>
|
|
</DocsLayout>
|
|
);
|
|
}
|