4 lines
7.7 KiB
JavaScript
4 lines
7.7 KiB
JavaScript
import{_ as o,o as i,c as t,a2 as d}from"./chunks/framework.BbmSSMjL.js";const u=JSON.parse('{"title":"CLAUDE.md","description":"","frontmatter":{},"headers":[],"relativePath":"CLAUDE.md","filePath":"CLAUDE.md"}'),s={name:"CLAUDE.md"};function n(a,e,c,r,l,h){return i(),t("div",null,[...e[0]||(e[0]=[d(`<h1 id="CLAUDE-md" tabindex="-1">CLAUDE.md <a class="header-anchor" href="#CLAUDE-md" aria-label="Permalink to "CLAUDE.md""></a></h1><p>This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.</p><h2 id="What-this-repository-is" tabindex="-1">What this repository is <a class="header-anchor" href="#What-this-repository-is" aria-label="Permalink to "What this repository is""></a></h2><p>Documentation site for <strong>RXThinkCMF</strong> (Laravel 13 + Vue3 + NaiveUI admin framework), built with VitePress 1.x. This folder contains <strong>only the docs</strong> — the product code lives in separate Gitee repositories. All content, sidebar labels, and UI text are in <strong>Simplified Chinese</strong>; write new content in Chinese.</p><p>Important context discovered only by reading multiple files:</p><ul><li>The git repository root is the <strong>parent directory</strong> (<code>…/v3/document/</code>), which holds 9 sibling variant doc sites (ThinkPHP6/8/Laravel13 × Layui/EleVue/AntdVue/NaiveVue) with near-identical structure. <code>git status</code> may show sibling folders; each has its own <code>package.json</code>, <code>.vitepress/</code>, <code>zh/</code>, <code>index.md</code>.</li><li>This variant's content was adapted from the EleVue sibling and has been <strong>converted to NaiveUI</strong> (2026-10). ElementPlus/EleVue references remain <strong>only where intentional</strong>: the 12-row variant table in <code>zh/introduction.md</code> (each row links a different real product), the nav dropdowns in <code>.vitepress/config/zh.ts</code> (cross-links to sibling doc sites), the commented-out <code>en.ts</code>, and the product-line sentence in <code>zh/other/sponsor.md</code>. When writing new factual content, verify against the actual NaiveUI product at <code>D:\\xampp8.2\\htdocs\\v3\\RXThinkCMF_Laravel13_NaiveVue\\ui</code> rather than copying sibling pages blindly; <code>RXThinkCMF_ThinkPhp6_NaiveVue</code> is a previously converted reference with the same conventions (naive-ui ^2.40.0, Vite ^5.4.3, <code>NTag</code>/<code>NAvatar</code>, <code>useMessage</code>/<code>useDialog</code> from <code>naive-ui</code>, <code>window.$message</code>/<code>$dialog</code> via <code>createDiscreteApi</code>, DB <code>rxthinkcmf.laravel13.naivevue</code>).</li><li>Code samples and paths in the docs (e.g. <code>app/</code>, <code>ui/src/store/modules/</code>) refer to the external product repository, not files in this repo.</li></ul><h2 id="Commands" tabindex="-1">Commands <a class="header-anchor" href="#Commands" aria-label="Permalink to "Commands""></a></h2><ul><li><code>pnpm docs</code> — dev server (<code>vitepress dev .</code>)</li><li><code>pnpm docs:build</code> — production build. <strong>This is also the validation step</strong>: VitePress fails the build on dead internal links (only <code>localhost</code> links are exempt, see <code>ignoreDeadLinks</code> in <code>.vitepress/config/index.ts</code>). Always run it after adding, renaming, or reordering pages. Takes ~40s; expected warnings: <code>gitignore</code> language fallback, chunk-size notice.</li><li><code>pnpm docs:preview</code> — serve the built site</li></ul><p>README specifies pnpm, though the committed lockfile is <code>yarn.lock</code>. There is no test suite or linter in this repo.</p><h2 id="Architecture" tabindex="-1">Architecture <a class="header-anchor" href="#Architecture" aria-label="Permalink to "Architecture""></a></h2><ul><li><code>index.md</code> — home page (<code>layout: home</code>, frontmatter-driven hero/features, imports <code>HomeSponsors</code> from the theme).</li><li><code>zh/</code> — all content, organized into chapter directories (<code>quickstart/</code>, <code>guide/</code>, <code>architecture/</code>, <code>core/</code>, <code>modules/</code>, <code>frontend/</code>, <code>deploy/</code>, <code>standards/</code>, <code>appendix/</code>, ...). Files are numbered by chapter position (e.g. <code>zh/core/jwt.md</code> is section 5.1).</li><li><code>.vitepress/config/index.ts</code> — entry; merges shared config with the <code>zh</code> locale as root (<code>zh-CN</code>). The English locale (<code>.vitepress/config/en.ts</code>) is entirely commented out — leave it that way unless asked.</li><li><code>.vitepress/config/zh.ts</code> — nav + the full sidebar tree (~550 lines). <strong>The central file to update when adding, renaming, or reordering pages.</strong> Chapter comment banners record renumbering decisions.</li><li><code>.vitepress/config/shared.ts</code> — global theme config: custom <code>slugify</code>, markdown code themes, attribute delimiters, head/meta tags, social links, local search provider.</li><li><code>.vitepress/theme/</code> — extends the default theme: <code>Layout</code> slots (custom hero image, <code>AsideSponsors</code>), globally registered components (<code>VideoModuleLink</code>, <code>vImageViewer</code>), <code>styles/vars.css</code>, and the image-viewer plugin.</li><li><code>public/</code> — static assets (logos, banners, sponsors, <code>banner.js</code>).</li><li><code>.vitepress/translation-status.json</code> — tracks the zh translation hash/date.</li></ul><h2 id="Content-conventions" tabindex="-1">Content conventions <a class="header-anchor" href="#Content-conventions" aria-label="Permalink to "Content conventions""></a></h2><ul><li>Every page's H1 is <code><章号>.<节号> <标题></code> and <strong>must match its sidebar label exactly</strong> (sidebar <code>"5.16 统一响应与异常抛出"</code> → <code>zh/core/exception.md</code> starts with <code># 5.16 统一响应与异常抛出</code>).</li><li>The H1 is immediately followed by a summary block:<div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes dracula-soft vitesse-light vp-code" tabindex="0"><code><span class="line"><span>:::tip 概述</span></span>
|
||
<span class="line"><span>一两句话概括本页内容。</span></span>
|
||
<span class="line"><span>:::</span></span></code></pre></div></li><li>Container directives in use: <code>:::tip</code>, <code>:::info</code>, <code>:::warning</code>, <code>:::danger</code>.</li><li>Internal links are root-absolute with an explicit <code>.html</code> extension: <code>[5.16 统一响应与异常抛出](/zh/core/exception.html)</code>.</li><li>Use fenced code blocks with a language tag; use <code>::: code-group</code> for side-by-side file examples.</li><li>Markdown attribute delimiters are customized to <code>%{</code> / <code>}%</code> (see <code>shared.ts</code>).</li></ul><h2 id="Adding-or-renumbering-pages" tabindex="-1">Adding or renumbering pages <a class="header-anchor" href="#Adding-or-renumbering-pages" aria-label="Permalink to "Adding or renumbering pages""></a></h2><ol><li>Create/edit the file under <code>zh/<section>/</code> following the conventions above.</li><li>Add or update its entry in the sidebar in <code>.vitepress/config/zh.ts</code> — pages not in the sidebar are unreachable from navigation.</li><li>If renumbering, the H1, sidebar label, and all cross-references to that section number elsewhere in <code>zh/</code> must stay in sync.</li><li>Run <code>pnpm docs:build</code> to confirm no dead links.</li></ol>`,15)])])}const m=o(s,[["render",n]]);export{u as __pageData,m as default};
|