This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pnpm install # Install dependencies (use pnpm to stay aligned with lockfile)
pnpm dev # Run dev server with Turbo on port 3000
pnpm build # Production build with type checks
pnpm start # Serve production build
pnpm next lint # Run ESLintThis is a Fumadocs-based multilingual blog for MultiPost, built with Next.js 15 and React 19. It supports 11 languages via a dynamic [lang] route segment.
lib/source.ts- MDX content loader using Fumadocs; wires content from@/.source(generated) with i18n configlib/i18n.ts- Defines supported languages: en (default), zh-Hans, zh-Hant, ja, ko, fr, es, pt, ms, id, rusource.config.ts- Fumadocs MDX configuration; defines frontmatter schema (title, description, keywords, date, author)app/layout.config.tsx- Shared layout options (nav, i18n) used by both home and blog layoutsmdx-components.tsx- MDX component overrides; extendsfumadocs-ui/mdxdefaults
app/
├── [lang]/
│ ├── (home)/page.tsx # Blog listing page with language navigation
│ ├── blog/
│ │ ├── [[...slug]]/page.tsx # Individual blog post (catch-all)
│ │ └── layout.tsx # DocsLayout with disabled sidebar
│ ├── api/search/route.ts # Search endpoint via Fumadocs
│ └── layout.tsx # RootProvider with i18n translations
├── sitemap.ts # Auto-generated multilingual sitemap
└── layout.tsx # Root HTML layout
MDX files in content/docs/ use locale suffixes:
index.mdx- English (default)index.zh-Hans.mdx- Simplified Chineseindex.ja.mdx- Japanese- etc.
Frontmatter fields: title, description, keywords (comma-separated), date, author
When creating new articles:
- Write the English version first (
index.mdx) - Only create translations when explicitly requested
- Use full-width punctuation for Chinese content
- TypeScript with 2-space indentation
- Components in
app/: PascalCase - Utilities in
lib/: camelCase - MDX filenames: kebab-case
- Run
pnpm next lintbefore PRs
Pushes to main auto-deploy to Vercel via GitHub Actions (.github/workflows/deploy.yml).