mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
Finish the fumadocs→Hanzo Docs rebrand: rename the remaining fuma-named
workspace packages and every reference so the framework is uniformly
@hanzo/docs-*. One brand, no Fuma in package names or product surface.
Package renames (name field + all refs: deps, imports, CSS @import,
configs, .changeset, next/vite build config):
fumadocs-core → @hanzo/docs-core
fumadocs-mdx → @hanzo/docs-mdx
fumadocs-ui → @hanzo/docs-ui (packages/radix-ui)
fumadocs-openapi → @hanzo/docs-openapi
fumadocs-preview → @hanzo/docs-preview
@fumadocs/base-ui → @hanzo/docs-base-ui
@fumadocs/basehub → @hanzo/docs-basehub
@fumadocs/language → @hanzo/docs-language
@fumadocs/local-md → @hanzo/docs-local-md
@fumadocs/sanity → @hanzo/docs-sanity
@fumadocs/shadcn → @hanzo/docs-shadcn
@fumadocs/vite → @hanzo/docs-vite
@fumari/stf → @hanzo/docs-stf
create-fumadocs-app → @hanzo/create-docs
create-fumadocs-versions → @hanzo/docs-create-versions
Stale @fumadocs/{cli,story,tailwind,mdx-remote,...} references collapsed to
their existing @hanzo/docs-* canonical packages (no dup created).
De-branded product strings: Fumadocs/Fuma prose → Hanzo Docs/Hanzo; site
branding, CLI output, doc copy, AI-assistant name, metadata. URLs
fumadocs.dev → docs.hanzo.ai, repo fuma-nama/fumadocs → hanzoai/docs.
Filesystem renames: packages/python/fumapy → hanzodocs_py, preview config,
what-is-fumadocs.mdx → what-is-hanzo-docs.mdx, api/fumadocs-ui route.
KEPT (real external npm deps / attribution — NOT renamed):
fuma-cli, fuma-content, @fumari/json-schema-ts (published upstream pkgs),
typesense-/trieve-fumadocs-adapter (3rd-party search adapters),
LICENSE "Copyright (c) 2023 Fuma" (OSS attribution, all 7 LICENSE files
untouched), CHANGELOG.md history (accurate release records, left as-is).
Build: node 24, pnpm install clean; all 4 target apps next build GREEN
(spec, gui-docs, zen-docs, base-docs) + full package closure (18/18 turbo).
Gate: zero @hanzo-package fumadocs-/@fumadocs/ references remain.
77 lines
2.5 KiB
TypeScript
77 lines
2.5 KiB
TypeScript
import type { Route } from './+types/docs';
|
|
import { DocsLayout } from '@hanzo/docs-ui/layouts/docs';
|
|
import {
|
|
DocsBody,
|
|
DocsDescription,
|
|
DocsPage,
|
|
DocsTitle,
|
|
MarkdownCopyButton,
|
|
ViewOptionsPopover,
|
|
} from '@hanzo/docs-ui/layouts/docs/page';
|
|
import { getPageMarkdownUrl, source } from '@/lib/source';
|
|
import browserCollections from 'collections/browser';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
import { gitConfig } from '@/lib/shared';
|
|
import { useHanzoDocsLoader } from '@hanzo/docs-core/source/client';
|
|
import { getPageImagePath } from '@/lib/og';
|
|
import { useMDXComponents } from '@/components/mdx';
|
|
|
|
export async function loader({ params }: Route.LoaderArgs) {
|
|
const slugs = params['*'].split('/').filter((v) => v.length > 0);
|
|
const page = source.getPage(slugs);
|
|
if (!page) throw new Response('Not found', { status: 404 });
|
|
|
|
return {
|
|
path: page.path,
|
|
markdownUrl: getPageMarkdownUrl(page).url,
|
|
pageTree: await source.serializePageTree(source.getPageTree()),
|
|
imagePath: getPageImagePath(slugs),
|
|
};
|
|
}
|
|
|
|
const clientLoader = browserCollections.docs.createClientLoader({
|
|
component(
|
|
{ toc, frontmatter, default: Mdx },
|
|
// you can define props for the `<Content />` component
|
|
{
|
|
markdownUrl,
|
|
path,
|
|
imagePath,
|
|
}: {
|
|
markdownUrl: string;
|
|
path: string;
|
|
imagePath: string;
|
|
},
|
|
) {
|
|
return (
|
|
<DocsPage toc={toc}>
|
|
<title>{frontmatter.title}</title>
|
|
<meta name="description" content={frontmatter.description} />
|
|
<meta property="og:image" content={imagePath} />
|
|
<DocsTitle>{frontmatter.title}</DocsTitle>
|
|
<DocsDescription>{frontmatter.description}</DocsDescription>
|
|
<div className="flex flex-row gap-2 items-center border-b -mt-4 pb-6">
|
|
<MarkdownCopyButton markdownUrl={markdownUrl} />
|
|
<ViewOptionsPopover
|
|
markdownUrl={markdownUrl}
|
|
githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/content/docs/${path}`}
|
|
/>
|
|
</div>
|
|
<DocsBody>
|
|
<Mdx components={useMDXComponents()} />
|
|
</DocsBody>
|
|
</DocsPage>
|
|
);
|
|
},
|
|
});
|
|
|
|
export default function Page({ loaderData }: Route.ComponentProps) {
|
|
const { path, pageTree, imagePath, markdownUrl } = useHanzoDocsLoader(loaderData);
|
|
|
|
return (
|
|
<DocsLayout {...baseOptions()} tree={pageTree}>
|
|
{clientLoader.useContent(path, { markdownUrl, path, imagePath })}
|
|
</DocsLayout>
|
|
);
|
|
}
|