3.6 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repository is
A VitePress 1.x documentation site (Chinese, zh-CN) for the RXThinkCMF ThinkPHP6 + AntDesign admin framework. There is no application source code here — only Markdown content, VitePress config, and a custom theme. The documented framework's PHP/Vue source lives in separate repositories.
Note: much of the body content is shared text across the RXThinkCMF variant docs; some pages (e.g. zh/introduction.md, zh/tech-stack.md, config metadata in .vitepress/config/zh.ts) still say "ElementPlus" while the homepage says "AntDesign". Match the surrounding page's terminology rather than assuming.
Commands
pnpm install # install dependencies (README uses pnpm; a yarn.lock also exists)
pnpm docs # dev server (vitepress dev .)
pnpm docs:build # static build — ALSO the link checker (build fails on dead internal links)
pnpm docs:preview # preview the built site
There is no lint or test tooling. pnpm docs:build is the verification step: it fails on broken internal links (only localhost links are exempt via ignoreDeadLinks in .vitepress/config/index.ts). Run it after adding, renaming, or removing pages.
Architecture
zh/— all documentation content (~140 pages), organized by chapter:quickstart/,guide/,architecture/,core/,modules/,tools/,api-spec/,frontend/,generator/,deploy/,standards/,appendix/,other/.index.md— homepage (hero + features frontmatter)..vitepress/config/shared.ts— global config: light-only appearance, customslugifyfor anchors, markdown themes, head tags, local search.zh.ts— nav and the entire sidebar tree. The sidebar is fully manual: every page must be added here or it will not appear in navigation.index.ts— locale wiring (root locale is Chinese; the English locale inen.tsis commented out/inactive).
.vitepress/theme/— extends the default VitePress theme: sponsors components (AsideSponsors,HomeSponsors), global component registrations (VideoModuleLink,vImageViewer), image-viewer plugin, custom styles.public/— static assets referenced by absolute path (/logo.png,/demo/*.png,/banners/,/volume1|3|5/, sponsor images).
Content conventions
- All content is written in Simplified Chinese.
- Each page's H1 includes its chapter number matching the sidebar label (e.g.
# 12.3 Git 提交规范), usually followed by a:::tip 概述container. - Internal links use absolute paths with an explicit
.htmlsuffix:[开发环境准备](/zh/quickstart/environment.html)— this applies both in Markdown prose and inzh.tssidebar entries. - Images are stored under
public/and embedded with absolute paths, typically as raw HTML<img src="/demo/1.png"/>. - Markdown attribute delimiter is
%{ ... }%(not the default{ ... }), configured inshared.ts. - When adding a page: create the file under
zh/, add the sidebar entry in.vitepress/config/zh.tswith its number, then runpnpm docs:buildto verify links.
Git
- The git repository root is the parent directory (
.../v3/document), which contains 9 sibling variant doc sites (ThinkPhp6/ThinkPhp8/Laravel13 × EleVue/AntdVue/NaiveVue).git statuswill show changes outside this directory — only touch files under this project's folder unless asked otherwise. - Commit messages follow Conventional Commits as documented in
zh/standards/git.md(e.g.docs: 补充多数据库部署文档), though historical commits here mostly read签入版本.