Skip to content

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

厚浪云 (HouLang Cloud) homepage - A multilingual VitePress-based static site providing information about cloud services including web hosting, domains, mirrors, and developer tools.

Development Commands

bash
# Install dependencies
npm install

# Development server with host binding
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Architecture

This is a VitePress static site with the following structure:

Core Components

  • .vitepress/config.mjs: Central configuration file defining internationalization (i18n) for three languages:

    • zh-CN (简体中文) - Primary/default locale
    • zh-Hant (繁體中文) - Traditional Chinese
    • en (English) - International English
    • Uses subdirectory routing structure for multi-language support
  • .vitepress/theme/: Custom VitePress theme with:

    • index.js: Theme entry point with Logto authentication integration
    • Layout.vue: Main layout component
    • composables/: Vue composables for various functionality
    • Custom styling and components

Content Structure

├── zh-CN/          # Simplified Chinese content
├── zh-Hant/        # Traditional Chinese content
├── en/             # English content
├── index.md        # Root redirect page
└── public/         # Static assets (logos, verification files, etc.)

Each locale follows the same structure:

  • index.md: Homepage with feature cards
  • article/about/: About section (about, history, join, team)
  • article/products/: Products section (product list, HLmirror, HFW, HL4)

Key Features

  1. Internationalization: Native VitePress i18n with language-specific navigation, sidebars, and content
  2. SEO Optimization: Structured data, hreflang tags, sitemap with multi-language support, OpenGraph tags
  3. Analytics: Umami analytics integration via analytics.houlang.cloud
  4. Authentication: Logto OAuth integration for user authentication
  5. Social Integration: Bilibili social link integration with custom icons

Dependencies

  • VitePress: Static site generator and theming system
  • @logto/vue: Authentication service integration
  • vitepress-sidebar: Sidebar generation (currently using native VitePress configuration)

Development Notes

  • The project follows TRAE project rules (see .trae/rules/project_rules.md):
    • Use latest versions of all dependencies
    • Add "EDIT BY TRAE" comments when modifying code
    • Follow VitePress official best practices
  • Build output goes to .vitepress/dist/
  • Cache and dependencies in .vitepress/cache/ and node_modules/
  • Public assets served from /public/ directory
  • Supports clean URLs (cleanUrls: true) for better SEO

Deployment

The site is configured for production deployment with:

  • Multi-language sitemap generation
  • Structured data markup for search engines
  • Language-specific 404 pages with appropriate messaging
  • SEO-optimized meta tags and hreflang implementation