This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the official documentation site for MyBatis-Plus, built with Astro and Starlight. The site supports multi-language documentation (Chinese, English, Japanese) with an integrated translation plugin.
# Start development server
npm run dev
# or
npm start
# Build the site (includes type checking)
npm run build
# Preview the built site
npm run preview
# Check types only
astro checkThe project includes a custom translation plugin located in translation-plugin/:
# Translate all content to all target languages
npm run translate
# Translate to specific language
npm run translate:en # English
npm run translate:ja # Japanese
# Dry run to check what would be translated
npm run translate:check
# Incremental translation (only changed files)
npm run translate:incremental
# Translate specific file
npm run translate:file
npm run translate:en:file
npm run translate:ja:fileTranslation configuration is in translation-plugin/config.json. The plugin supports multiple AI providers and maintains translation cache.
- Framework: Astro with Starlight documentation theme
- Styling: TailwindCSS with custom components
- Interactive Components: Svelte components for dynamic features
- Content: Markdown files in
src/content/docs/with frontmatter - Localization: Multi-language support with automatic sidebar generation
src/content/docs/- Main documentation content (Chinese)src/content/docs/en/- English translationssrc/content/docs/ja/- Japanese translationssrc/components/- Astro and Svelte componentstranslation-plugin/- Custom translation automation system
Custom Starlight components are overridden in src/components/:
Header.astro- Site headerFooter.astro- Site footerSidebar.astro- Navigation sidebarPageSidebar.astro- Page-specific sidebar
Documentation follows Starlight's structure with autogenerated sidebars:
getting-started/- Getting started guidesguides/- User guidesplugins/- Plugin documentationreference/- API referenceresources/- Additional resources
astro.config.mjs- Main Astro configuration with Starlight setuptailwind.config.mjs- TailwindCSS configurationtsconfig.json- TypeScript configurationtranslation-plugin/config.json- Translation system configuration
The site uses Starlight's built-in i18n with:
- Default locale: Chinese (
root) - Supported locales: English (
en), Japanese (ja) - Translations managed through frontmatter and the translation plugin
- Edit links point to the GitHub repository
When working with content:
- Always update the Chinese (root) version first
- Use the translation plugin to generate other language versions
- Review generated translations for technical accuracy
- Ensure code examples and links work across all languages