mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
The docs estate declared its typeface in 30 root layouts and one linked stylesheet, each pulling a third-party family off a hosted font CDN on the critical path of every route. Two of those surfaces also self-hosted the faces, so the same bytes were vendored by hand in the repo. @hanzo/font 1.8.8 is where Zen is authored. It is now mounted the way this repo already mounts every other package stylesheet — `@import '@hanzo/font/css'` at the top of the app's own sheet — which declares the @font-face rules and publishes --font-zen-sans / --font-zen-mono. A single :root block per app binds those to --font-sans / --font-mono, the pair every rule and every font-* utility already read, so the variable contract is untouched and the next face swap is two lines rather than a sweep. Genuine system fallbacks stay. Mounting through the sheet rather than a JS side-effect import also drops the untyped bare subpath TypeScript could not resolve, so no per-app declaration shim is needed. public/reference/ is static HTML with no bundler, so it keeps its own @font-face; scripts/sync-reference-fonts.ts copies the two variable faces out of the installed package on each build and the directory is ignored, the same rule public/openapi/ already follows. The hand-vendored faces are deleted. Also corrects the brand typography table, which still named a face Hanzo does not ship, and the three sample configs and two skill pages that repeated it.
Proposals Documentation Template
A shared template for improvement proposals documentation sites:
- LPs - Lux Proposals (lps.lux.network)
- HIPs - Hanzo Improvement Proposals (hips.hanzo.ai)
- ZIPs - Zoo Improvement Proposals (zips.zoo.ngo)
Quick Start
pnpm install
pnpm dev
Customization
Brand Configuration
Edit lib/config.ts to use your brand:
// For Lux Proposals
import { luxBrand as brand } from './brand';
export { brand };
// For Hanzo Improvement Proposals
import { hanzoBrand as brand } from './brand';
export { brand };
// For Zoo Improvement Proposals
import { zooBrand as brand } from './brand';
export { brand };
Content Directory
Edit lib/instance.ts to point to your proposals directory:
// For LPs repository structure
const PROPOSALS_DIR = path.join(process.cwd(), '../LPs');
Categories
Customize categories in lib/brand.ts by editing the categories array:
categories: [
{
name: 'Core',
shortDesc: 'Core specifications',
description: 'Full description...',
range: [0, 99], // Proposal number range
icon: 'layers', // Icon from lucide-react
color: 'blue', // Tailwind color
learnMore: 'Educational content...',
keyTopics: ['Topic 1', 'Topic 2'],
},
]
Features
-
Context-Sensitive Search - Cmd+K opens a search dialog with:
- Category-based navigation
- Full-text search across proposals
- Page-specific actions (edit on GitHub, view raw, join discussion)
- Keyboard navigation
-
Proposal Metadata - Automatic parsing of frontmatter:
- Status badges (Draft, Review, Final, etc.)
- Category classification
- Author attribution
- Dependencies tracking
-
Statistics Dashboard - Sidebar showing:
- Total proposals count
- Count by status
- Count by type
Project Structure
proposals/
├── app/
│ ├── api/search/ # Search API endpoint
│ ├── docs/ # Documentation pages
│ ├── (home)/ # Landing page
│ ├── global.css # Global styles
│ └── layout.tsx # Root layout
├── components/
│ └── search-dialog.tsx # Custom search with quick actions
├── lib/
│ ├── brand.ts # Brand configurations (LP, HIP, ZIP)
│ ├── config.ts # Active brand selection
│ ├── source.ts # Proposal source loader
│ └── instance.ts # Source instance
├── content/docs/ # Sample proposals (or point to real dir)
└── public/ # Static assets
Deployment
For Lux Proposals (lps.lux.network)
- Clone the lps repository
- Copy this template to the
docs/directory - Update
lib/config.tsto useluxBrand - Update
lib/instance.tsto point to../LPs - Deploy to Vercel/Netlify
For Hanzo HIPs or Zoo ZIPs
Same process, using the appropriate brand configuration.
License
MIT - See LICENSE