Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 3.51 KB

File metadata and controls

72 lines (56 loc) · 3.51 KB

PROJECT KNOWLEDGE BASE

OVERVIEW

Shift2Modern is a Mintlify documentation site for Chinese-language guides about modern development workflows and tools. The maintained MDX source lives in content/; root-level index.mdx and guide/ are generated mirrors for Mintlify's route-based file lookup.

STRUCTURE

/
├── content/               # Maintained MDX source pages
├── docs.json              # Mintlify site config and public navigation paths
├── public/                # Static assets copied into the export
├── scripts/               # Mintlify/Vercel build helpers
└── package.json           # pnpm scripts

Generated mirrors such as index.mdx and guide/ are ignored by Git. Do not edit them directly; edit the matching file under content/.

WHERE TO LOOK

Task Location Notes
Add or edit guide content content/**/*.mdx Source of truth
Change public navigation or routes docs.json Keep existing public URLs stable unless explicitly requested
Prepare Mintlify root mirrors scripts/prepare-mintlify-content.mjs Copies content/**/*.mdx to root paths from docs.json
Generate Vercel AI/static Markdown files scripts/generate-ai-static.mjs Reads source from content/
Vercel static export scripts/vercel-build.mjs Runs prepare, mint export, and AI static generation
Contributor-facing rules content/guide/contribution-guidelines.mdx Update when content policy changes

CONTENT MAP

Path Topic
content/index.mdx Landing page
content/guide/preface.mdx Preface
content/guide/contribution-guidelines.mdx Contribution and writing rules
content/guide/vscode/ VSCode guides
content/guide/git/ Git guides
content/guide/markdown/ Markdown guides
content/guide/terminal/ Terminal guides
content/guide/github/ GitHub, GitHub Desktop, and quick collaboration guides
content/guide/mindmap/ Mind map guides
content/guide/regexp/ Regular expression guide

CONTENT CONVENTIONS

  • Keep main prose in Simplified Chinese. Keep product names and technical terms in their original form when clearer.
  • Every page should have frontmatter with at least title and description.
  • Guide pages intentionally live under the public /guide/... namespace. Moving content/guide/git/introduction.mdx changes the source location; docs.json controls the public route guide/git/introduction.
  • New pages must be added to docs.json navigation before they are built or included in AI static output.
  • Use Mintlify components already present in the repo, such as Card, CardGroup, Note, Warning, and Info.
  • Reference local images as /img/..., not public/img/....

COMMANDS

pnpm run prepare:mintlify  # Generate ignored root mirrors from content/
pnpm run dev               # Prepare mirrors, then run Mintlify dev
pnpm run validate          # Prepare mirrors, then validate
pnpm run export            # Prepare mirrors, then export
pnpm run build             # Vercel static output build

The local default Node may be newer than Mintlify supports. The project target is Node 22.

ANTI-PATTERNS

  • Do not edit generated root .mdx files or generated root chapter directories.
  • Do not commit generated .vercel/output, export.zip, or root page mirrors.
  • Do not change public route paths unless the user explicitly accepts URL/SEO impact.
  • Do not reintroduce Docus/Nuxt content conventions; the site is Mintlify-based now.