Files
docs/apps/bootnode-docs/source.config.ts
T
zeekay cb29925570 fix(docs): normalize phantom workspace package names — monorepo installs again
The fumadocs-fork rebrand left ~13 apps + examples referencing packages under
names that don't exist in the workspace (in BOTH directions: some kept
fumadocs-*, some became @hanzo/docs-*). pnpm install failed outright. Mapped
every reference (deps + imports, 607 source + 61 package.json) to the package
that actually exists, by suffix:
  @hanzo/docs-{core,mdx,ui,base-ui} → fumadocs-{core,mdx,ui} / @fumadocs/base-ui
  @fumadocs/{story,cli,mdx-remote,tailwind} → @hanzo/docs-{story,cli,...}
  fumadocs-{docgen,epub,twoslash,typescript} → @hanzo/docs-{...}
  drop phantom eslint-config-custom
Guarded @hanzo/docs-mdx vs -mdx-remote. Also fixes a pre-existing cli bug
(createConfigSchema referenced undefined isSrc) that blocked the package build.

Verified: pnpm install resolves clean (46.8s, was broken); package dist
regenerates phantom-free from the corrected source (hanzo-docs 430→0). Full
app build-green is blocked only by a node v26 toolchain bug in fumadocs-mdx's
config loader (repo targets node >=24.14; CI node builds it).
2026-06-24 15:17:27 -07:00

66 lines
1.8 KiB
TypeScript

import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema,
} from 'fumadocs-mdx/config';
import { z } from 'zod';
import lastModified from 'fumadocs-mdx/plugins/last-modified';
export const docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false),
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true,
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import('fumadocs-core/mdx-plugins/rehype-code');
const { remarkStructureDefaultOptions } =
await import('fumadocs-core/mdx-plugins/remark-structure');
const { remarkSteps } = await import('fumadocs-core/mdx-plugins/remark-steps');
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, 'code'],
},
rehypeCodeOptions: {
langs: ['ts', 'js', 'rust', 'python', 'go', 'bash', 'json', 'yaml', 'toml', 'shell', 'typescript', 'javascript', 'markdown', 'solidity'],
inline: 'tailing-curly-colon',
themes: {
light: 'github-light',
dark: 'github-dark',
},
transformers: [
...(rehypeCodeDefaultOptions.transformers ?? []),
],
},
remarkCodeTabOptions: {
parseMdx: true,
},
remarkNpmOptions: {
persist: {
id: 'package-manager',
},
},
remarkPlugins: [remarkSteps],
})(environment);
},
},
meta: {
schema: metaSchema.extend({
description: z.string().optional(),
}),
},
});
export default defineConfig({
plugins: [
lastModified(),
],
});