developing

zlliang 的头像作者 zlliang

指导本仓库中基于Astro的个人网站开发。用于构建功能、修复错误或运行`www`、`tech`或`days`网站的dev和build命令。

📖 中文导读:指导本仓库中基于Astro的个人网站开发。用于构建功能、修复错误或运行`www`、`tech`或`days`网站的dev和build命令。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: developing description: Guides development of the Astro-based personal websites in this monorepo. Use when building features, fixing bugs, or running dev and build commands for www, tech, or days sites.

Developing

Tech stack

Monorepo structure

This repository contains three Astro websites:

websites/
├── www/    # zlliang.me – Personal landing page (English and Chinese, with [Astro's i18n support](https://docs.astro.build/guides/internationalization/))
├── tech/   # tech.zlliang.me – Tech learning and research (English)
└── days/   # days.zlliang.me – Daily life and reflections (Chinese)

Commands

From the repository root:

pnpm install        # Install all dependencies

pnpm run www:dev    # Start www dev server, on port 3001
pnpm run tech:dev   # Start tech dev server, on port 3002
pnpm run days:dev   # Start days dev server, on port 3003

pnpm run www:build  # Build www for production
pnpm run tech:build # Build tech for production
pnpm run days:build # Build days for production

Conventions

  • Path alias: Use @/* for src/* imports within each site
  • Components: Use PascalCase for .astro files
  • Content: Organized by [year]/[month]/[day]/[slug].md
  • Styling: Tailwind utilities; global styles in src/styles/main.css
  • Git commits: Follow Conventional Commits; for content authoring, use docs: type with the relevant title in the message

Misc

  • Use lodash-es and date-fns for utilities
  • Custom rehype plugins go in src/utils/rehype.ts on each site
  • Always verify production builds