This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Docusaurus 3.9.2 documentation site for the Ultimate Multisite WordPress plugin ecosystem. Deployed to ultimatemultisite.com/docs/ via GitHub Actions on push to main.
Three documentation sections with independent sidebars defined in sidebars.js:
- User Guide (
docs/user-guide/) — end-user documentation - Developer (
docs/developer/) — hooks reference, REST API, integration guides - Addons (
docs/addons/) — documentation for 26+ addon plugins
npm start # Dev server at localhost:3000 with hot reload
npm run build # Production build to /build/
npm run serve # Serve production build locally
npm run clear # Clear Docusaurus cache (.docusaurus/)node scripts/translate.js --locales es,fr # Translate specific locales
node scripts/translate.js --locales all # Translate all locales
node scripts/translate.js --locales fr --dry-run # Preview without writing
node scripts/translate.js --commit # Auto-commit each translated fileRequires env vars: OPENAI_API_KEY, OPENAI_API_BASE, OPENAI_MODEL (see scripts/translate.env.example).
bash scripts/generate-hooks.sh # Requires PHP 8.3+ and plugin source checkoutsGenerates WordPress hooks docs from PHP source into docs/developer/hooks/ and docs/addons/*/hooks/. Requires ultimate-multisite/ and addons/ directories (cloned by CI, gitignored locally).
All documentation is Markdown/MDX in docs/. Pages use frontmatter for metadata:
---
title: Page Title
sidebar_position: 1
---Docs route base path is / (not /docs/), configured in docusaurus.config.js.
- English source in
docs/, translations ini18n/{locale}/ - Currently active locales:
en,es(100+ more available in config, commented out) - RTL languages configured in
docusaurus.config.jslocaleConfigs scripts/translate.jsuses OpenAI-compatible API with smart preservation of code blocks, JSX, and links
- Hooks docs: Generated by
@10up/wp-hooks-documentorfrom PHP source viascripts/generate-hooks.sh - Changelogs: Extracted from addon repos by
scripts/update-changelogs.py - Both run during CI build before
docusaurus build
src/components/AddonBanner.js— React component showing purchase/download links for paid addonssrc/css/custom.css— Green theme (#678233 primary) with dark mode support
Two GitHub Actions workflows:
- deploy-docs.yml — on push to main: checks out 26+ addon repos, generates hooks/changelogs, builds, deploys via rsync
- translate.yml — manual trigger: runs AI translation with configurable languages, force, and debug options
ultimate-multisite/, addons/, wp-hooks-docs/, .hooks-tmp/ are cloned/generated at build time and gitignored. Do not create these directories manually.