mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
One app carried the Hanzo shell and twenty did not, so a reader crossing from base.hanzo.ai to zen.hanzo.ai left the ecosystem and landed somewhere that only resembled it. Five of those twenty had hand-rolled a footer of their own — sixteen lines of copyright and a repo link, written five separate times. Each app now loads the brand tokens before its own sheet, reports through docs-analytics under its own product name, and renders HanzoFooter from @hanzogui/shell — the same 6-column ecosystem footer, defined once, that apps/docs already used. A footer written inside a layout was chrome pretending to be content, and it is gone. A footer written inside a page is content pretending to be chrome: those keep their words and become sections, so each page has one contentinfo landmark instead of two. Three manifests listed @hanzo/font twice in the same object. Builds verified across the four shapes this repo has: a static export, a next.config.mjs app, a single-page app with no route groups, and one that already reported analytics. Every one renders exactly one footer. Co-authored-by: Hanzo Dev <[email protected]>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { resolve } from 'path';
|
|
import createBundleAnalyzer from '@next/bundle-analyzer';
|
|
import { createMDX } from '@hanzo/docs/mdx/next';
|
|
import type { NextConfig } from 'next';
|
|
|
|
const withAnalyzer = createBundleAnalyzer({
|
|
enabled: process.env.ANALYZE === 'true',
|
|
});
|
|
|
|
const config: NextConfig = {
|
|
// Both ship ESM with 'use client' boundaries, so the client/server split
|
|
// and the JSX runtime resolve only when the app build compiles them.
|
|
transpilePackages: ['@hanzogui/shell', '@hanzo/brand'],
|
|
output: 'export',
|
|
reactStrictMode: true,
|
|
typescript: {
|
|
// Types resolve correctly at runtime via docsLazy/AsyncDocCollectionEntry
|
|
// but TS inference breaks on the complex MDX runtime generics chain
|
|
ignoreBuildErrors: true,
|
|
},
|
|
webpack: (config) => {
|
|
config.resolve.alias = {
|
|
...config.resolve.alias,
|
|
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
|
|
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
|
|
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
|
|
};
|
|
return config;
|
|
},
|
|
logging: {
|
|
fetches: {
|
|
fullUrl: true,
|
|
},
|
|
},
|
|
serverExternalPackages: [
|
|
'shiki',
|
|
],
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
};
|
|
|
|
const withMDX = createMDX();
|
|
|
|
export default withAnalyzer(withMDX(config as any) as NextConfig);
|