/doc/src/content/CLAUDE.md
CLAUDE.md at /doc/src/content/CLAUDE.md
Path: doc/
CLAUDE.md — src/content
Bilingual Rule (EN + JA)
When adding or modifying any documentation page, always update both languages:
English:
src/content/ docs/ <category>/ <page>. mdx Japanese:
src/content/ docs- ja/ <category>/ <page>. mdx
The JA directory mirrors the EN directory structure exactly. Every EN page has a corresponding JA page.
Exception: Pages with generated: true in frontmatter (e.g. claude-resources auto-generated pages) do not require Japanese translations.
Translation Rules
Prose: Translate to Japanese
Code blocks: Keep identical to EN — do NOT translate comments, strings, or identifiers in code blocks
Frontmatter
titleanddescription: TranslateFrontmatter
category,sidebar_position,tags: Keep identical to ENInline code (
`): Keep identicalLink text: Translate
Link URLs: Keep identical (they resolve to the same page under the appropriate locale)
Internal Links
Use relative .mdx paths for cross-page links, not absolute paths. The resolveMarkdownLinks plugin rewrites .md/.mdx extensions and applies the base prefix; bare absolute paths bypass it.
<!-- Good — relative path -->
See the [methodology](../../reference/methodology/index.mdx) page.
<!-- Bad — breaks under settings.base -->
See the [methodology](/docs/reference/methodology) page.External links (https:) pass through unchanged.
Frontmatter Schema
---
title: Page Title
description: Short description (shown in sidebar and SEO)
sidebar_position: 1
category: guide
---| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Page title, rendered as the page h1 |
description | string | No | Subtitle displayed below the title; also used for SEO |
sidebar_position | number | No | Sort order within the category (lower = higher). Always set for predictable ordering |
sidebar_label | string | No | Custom sidebar text (overrides title) |
category | string | No | Groups pages in the sidebar; must match a categoryMatch in src/ |
tags | string[] | No | Optional tag list |
draft | boolean | No | Excluded from production builds when true |
generated | boolean | No | Build-time generated content — skip bilingual requirement |
Content Rules
No h1 in content body: The frontmatter
titleis automatically rendered as the page h1. Start your content with## h2headings.Always set
sidebar_position: Without it, pages sort alphabetically, which is unpredictable.Kebab-case file names: Use
my-article.mdx, notmyArticle.mdx.
Linking Between Docs
Use relative file paths with the .mdx extension:
[Link text](./sibling-page.mdx)
[Link text](../other-category/page.mdx#anchor)Admonitions
Available globally without imports: <Note>, <Tip>, <Info>, <Warning>, <Danger>
<Note>This is a note.</Note>
<Warning>This is a warning.</Warning>Navigation Structure
Navigation is filesystem-driven. The directory structure under src/ directly becomes the sidebar. Pages are ordered by sidebar_position (ascending). Category index pages (index.mdx) control category position via their own sidebar_position.
There are no _category_.json files — category metadata (label, sort order) is expressed via the index.mdx frontmatter in each directory.
Categories and Header Nav
Top-level directories under src/ that have header nav entries (mapped via categoryMatch in src/):
overview/— What is?, Getting Startedplayground/— Playgroundguide/— Configuration, CLI, Ignore Syntax, Examplesreference/— API, Methodologychangelog/— Changelog
Auto-generated directories (managed by claude-resources integration on every build; gitignored — do not hand-edit):
claude/— Claude Skills documentationclaude-md/— CLAUDE.md file documentation
Adding a new header nav category requires updating headerNav in src/.
Content Creation Workflow
Create English
.mdxfile undersrc/withcontent/ docs/ titleandsidebar_positionWrite content starting with
## h2headings (not# h1)Create matching Japanese file under
src/with translated prosecontent/ docs- ja/ Keep code blocks identical between languages — only translate prose
Run
pnpm format:mdthenpnpm build:docfrom the repo root (orpnpm buildinsidedoc/) to verify