mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-27 09:19:53 +00:00
- Renamed fumaMatter → parseFrontmatter - Renamed fuma-matter.ts → frontmatter.ts - Removed deprecated toFumadocsSource() method, keeping only toSource() - Updated all type names: FumadocsDataMap → DocsDataMap, etc. - Updated FumapressConfig → PressConfig, fumapress → hanzoPress - Updated useFumadocsLoader → useDocsLoader - Updated writeFumadocsRegistry → writeDocsRegistry - Updated all README files with Hanzo Docs branding - Updated create-app templates to use hanzoai/docs GitHub repo - Updated all example files and documentation content - Updated robots.txt, GitHub workflows, and issue templates - Updated test fixtures with hanzo-docs.dev URLs - Published updated packages to npm BREAKING CHANGE: All fumadocs imports must be updated to use new names: - fumaMatter → parseFrontmatter - toFumadocsSource → toSource - useFumadocsLoader → useDocsLoader
24 lines
625 B
Plaintext
24 lines
625 B
Plaintext
import type { Config } from '@react-router/dev/config';
|
|
import { glob } from 'node:fs/promises';
|
|
import { createGetUrl, getSlugs } from 'hanzo-docs-core/source';
|
|
|
|
const getUrl = createGetUrl('/docs');
|
|
|
|
export default {
|
|
ssr: 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' })) {
|
|
paths.push(getUrl(getSlugs(entry)));
|
|
}
|
|
|
|
return paths;
|
|
},
|
|
} satisfies Config;
|