mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
fix(type): every app and every template a customer generates starts on Zen
Thirteen shipped apps and every scaffold in packages/create-app pulled their face from Google at request time — Inter through next/font/google in the examples and the four Next templates, Geist and Geist_Mono in the apps, and in the seven react-router roots a bare <link> to fonts.googleapis.com. That last one never even applied what it fetched: nothing in those trees set a family, so the browser downloaded Inter, spent two preconnects on it, and rendered system-ui. So `create-app` handed a customer a new docs site whose first act was a third-party font request for a face that is not ours. The apps read the family back through --font-sans and --font-mono, which are next/font's handles rather than names of anything, so those follow the binding over to --font-zen-sans and --font-zen-mono. Eight of them had only ever bound the mono and were leaning on Tailwind's default for the text face; they now name both, or swapping the binding would have dropped the body copy to system-ui without a word. Zen and ZenMono are built faces, not constructors — subsetting, display: swap and fallback metrics are already in them — so the call and its options go away.
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
import './global.css';
|
||||
import { RootProvider } from '@hanzo/docs/ui/provider/next';
|
||||
import { Inter } from 'next/font/google';
|
||||
import { Zen } from '@hanzo/font';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
});
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={inter.className} suppressHydrationWarning>
|
||||
<html lang="en" className={Zen.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<RootProvider>{children}</RootProvider>
|
||||
</body>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"@hanzo/docs-mdx": "workspace:*",
|
||||
"@hanzo/docs-python": "workspace:*",
|
||||
"@hanzo/docs-base-ui": "workspace:*",
|
||||
"@hanzo/font": "^1.9.2",
|
||||
"next": "16.1.6",
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4"
|
||||
|
||||
Reference in New Issue
Block a user