Official documentation site for @kitajs/html, built with Rspress 2.0.
This is a fresh documentation setup with improved structure, visual design, and organization.
# Install dependencies
pnpm install
# Start dev server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview- β‘ Lightning fast with Rspress 2.0
- π¨ Custom interactive hero with animated Doug turtle and VSCode mockup
- π― KitaJS brand colors throughout (terracotta #bd695e, #ad4336, #e4c8c5)
- π Reorganized content with better hierarchy
- π TypeScript hover info via Twoslash plugin
- πΊοΈ SEO-optimized with sitemap generation
- π³ File tree support for showing project structure
- πΌοΈ Open Graph images for social sharing
- π¦ Zero runtime dependencies (only @rspress/core)
docs-new/
βββ docs/
β βββ public/ # Static assets
β β βββ logo.png
β β βββ doug-pc-glasses.svg
β β βββ xss-preview.png
β βββ _nav.json # Top navigation
β βββ index.md # Home page with hero
β βββ guide/
β β βββ _meta.json
β β βββ introduction.md
β β βββ getting-started.md
β β βββ xss-protection/ # XSS security docs
β β β βββ overview.md
β β β βββ scanner.md
β β β βββ sanitization.md
β β βββ features/ # Feature docs
β β βββ jsx-syntax.md
β β βββ async-components.md
β β βββ benchmark.md
β βββ integrations/
β β βββ overview.md
β β βββ frameworks/
β β β βββ fastify.md
β β βββ libraries/
β β βββ htmx.md
β β βββ alpine.md
β β βββ turbo.md
β β βββ base-templates.md
β βββ api/ # API reference
β βββ index.md
β βββ core.md
β βββ jsx-runtime.md
β βββ plugins.md
βββ theme/
β βββ components/
β β βββ HeroInteractive.tsx # Animated hero
β β βββ HeroInteractive.module.css # Hero styles
β βββ index.tsx # Theme customization
β βββ index.css # Brand colors
βββ rspress.config.ts # Rspress configuration
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript config
--rp-c-brand: #bd695e; /* Primary terracotta */
--rp-c-brand-dark: #ad4336; /* Dark terracotta */
--rp-c-brand-light: #e4c8c5; /* Light terracotta */The hero section features:
- Floating Doug turtle logo with gentle animation
- Mock VSCode editor showing KitaJS code example
- Glowing effects with brand colors
- Smooth animations (float, breathe, shimmer)
- Fully responsive (hides mockup on mobile)
- @rspress/plugin-twoslash - TypeScript hover info in code blocks
- @rspress/plugin-sitemap - SEO sitemap generation
- rspress-plugin-file-tree - File tree visualizations
- rspress-plugin-og - Open Graph image generation
- rsbuild-plugin-open-graph - OG meta tags
The site can be configured via environment variables:
# Override hostname (default: html.kitajs.org)
DOCS_HOSTNAME=docs.example.com pnpm build- Total size: ~1.4 MB web assets (267 KB gzipped)
- 20 HTML pages generated
- Full-text search index included
- Clean URLs enabled (no .html extensions)
- Better organization - Logical content hierarchy with sections
- Interactive hero - Engaging homepage with animations
- Enhanced navigation - Clear sidebar with sections and dividers
- Brand consistency - KitaJS colors applied throughout
- TypeScript integration - Hover info for better learning
- SEO optimized - Sitemap, OG tags, meta descriptions
- Production-ready - Following rspress best practices
- Test the site at http://localhost:3000
- Review all pages for correctness
- Add more API documentation as needed
- Consider adding more examples
- Deploy to production at html.kitajs.org
The built site in dist/ is being deployed to GitHub Pages via the gh-pages branch. The
deployment workflow is configured in .github/workflows/ci.yml and runs on every push to
main.