mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
Merges upstream commits 1ad82416..20cf96d42 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.
31 lines
788 B
TypeScript
31 lines
788 B
TypeScript
import type { Config } from '@react-router/dev/config';
|
|
import { glob } from 'node:fs/promises';
|
|
import { createGetUrl, getSlugs } from '@hanzo/docs-core/source';
|
|
import { getPageImagePath } from './app/lib/og';
|
|
|
|
const getUrl = createGetUrl('/docs');
|
|
|
|
export default {
|
|
ssr: true,
|
|
future: {
|
|
v8_middleware: true,
|
|
},
|
|
async prerender({ getStaticPaths }) {
|
|
const paths: string[] = [];
|
|
const excluded: string[] = ['/api/search'];
|
|
|
|
for (const path of getStaticPaths()) {
|
|
if (!excluded.includes(path)) paths.push(path);
|
|
}
|
|
|
|
for await (const entry of glob('**/*.mdx', { cwd: 'content/docs' })) {
|
|
const slugs = getSlugs(entry);
|
|
|
|
paths.push(getUrl(slugs));
|
|
paths.push(getPageImagePath(slugs));
|
|
}
|
|
|
|
return paths;
|
|
},
|
|
} satisfies Config;
|