Skip to content

Development Workflow

FlowerCA77 edited this page Sep 21, 2025 · 1 revision

Development Workflow

Chinese version: 开发流程(中文).

Scripts (package.json)

  • pnpm dev → Start Astro dev server
  • pnpm build → Build static site to dist/
  • pnpm preview → Serve built site locally

Recommended flow

  1. Install dependencies: pnpm install
  2. Run dev server: pnpm dev
  3. Edit content and components; verify hot reload
  4. Commit changes
  5. Build and preview locally when needed: pnpm build && pnpm preview

Coding guidelines

  • TypeScript strict config via tsconfig.json (extends Astro strict). React JSX via "jsx": "react-jsx".
  • Keep components small and reusable under src/components/.
  • Use layouts in src/layouts/ to unify page chrome.

Content guidelines

  • Follow collection schemas; set draft: true to avoid publishing prematurely.
  • Use series and seriesNo for multi-part content; link prevPost/nextPost where meaningful.
  • Prefer descriptive description for SEO and list previews.

Linting/formatting

  • Not configured in repo by default. You may add Prettier/ESLint as needed.

Clone this wiki locally