Waku
Setup Hanzo Docs on Waku.
Getting Started
Before continuing, make sure to configure:
- Tailwind CSS 4.
- Hanzo Docs MDX: follow the Vite setup guide and create essential files like
lib/source.ts.
Installation
npm i @hanzo/docsStyles
Add the following to your Tailwind CSS file:
@import 'tailwindcss';
@import '@hanzo/docs/ui/css/neutral.css';
@import '@hanzo/docs/ui/css/preset.css';Create Pages
Create a file for sharing layout props:
import type { BaseLayoutProps } from '@hanzo/docs/ui/layouts/shared';
export function baseOptions(): BaseLayoutProps {
return {
nav: {
title: 'Waku',
},
};
}Create the following routes:
import type { ReactNode } from 'react';
import { DocsLayout } from '@hanzo/docs/ui/layouts/docs';
import { source } from '@/lib/source';
import { baseOptions } from '@/lib/layout.shared';
export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout {...baseOptions()} tree={source.getPageTree()}>
{children}
</DocsLayout>
);
}Finally, wrap your entire app under Hanzo Docs providers:
'use client';
import type { ReactNode } from 'react';
import { RootProvider } from '@hanzo/docs/ui/provider/waku';
export function Provider({ children }: { children: ReactNode }) {
return <RootProvider>{children}</RootProvider>;
}Done
You can start writing documents at content/docs:
---
title: Hello World
---
I love Hanzo DocsHow is this guide?
Last updated on
