Skip to content

Latest commit

Β 

History

History
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

README.md

@kitajs/html Documentation (New)

Official documentation site for @kitajs/html, built with Rspress 2.0.

This is a fresh documentation setup with improved structure, visual design, and organization.

Development

# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview

Features

  • ⚑ 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)

Project Structure

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

Theme Customization

Brand Colors (KitaJS)

--rp-c-brand: #bd695e; /* Primary terracotta */
--rp-c-brand-dark: #ad4336; /* Dark terracotta */
--rp-c-brand-light: #e4c8c5; /* Light terracotta */

Interactive Hero

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)

Plugins

  • @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

Configuration

The site can be configured via environment variables:

# Override hostname (default: html.kitajs.org)
DOCS_HOSTNAME=docs.example.com pnpm build

Build Output

  • 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)

Improvements Over Old Docs

  1. Better organization - Logical content hierarchy with sections
  2. Interactive hero - Engaging homepage with animations
  3. Enhanced navigation - Clear sidebar with sections and dividers
  4. Brand consistency - KitaJS colors applied throughout
  5. TypeScript integration - Hover info for better learning
  6. SEO optimized - Sitemap, OG tags, meta descriptions
  7. Production-ready - Following rspress best practices

Next Steps

  • 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

Deployment

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.

Resources