# AGENTS.md - MyBlog 编码指南 AI 智能助手在此 VuePress 博客项目中的工作指南。 ## 项目概述 - **框架**: VuePress v2(静态站点生成器) - **主题**: VuePress Theme Hope - **语言**: TypeScript + Vue 3 - **构建工具**: Vite - **包管理器**: npm ## 构建命令 ```bash # 开发 npm run docs:dev # 启动开发服务器 npm run docs:clean-dev # 清除缓存后启动 # 构建与部署 npm run docs:build # 生产构建 # 维护 npm run docs:update-package # 更新 VuePress 包 npm run update:browsers # 更新 browserslist # 类型检查 npx tsc --noEmit # TypeScript 检查 ``` ## 文件结构 ``` src/ ├── .vuepress/ │ ├── config.ts # 站点配置 │ ├── theme.ts # 主题配置 │ ├── navbar.ts # 导航配置 │ ├── sidebar.ts # 侧边栏配置 │ ├── styles/ # 自定义 SCSS │ └── components/ # Vue 组件 ├── programming/ # 编程文章 ├── apps/ # 应用部署指南 ├── tools/ # 工具分享 ├── work/ # 工作日志 └── README.md # 首页 ``` ## 代码风格 ### TypeScript - **模块**: ES 模块(`"type": "module"`) - **目标**: ES2022 - **解析**: NodeNext - 函数参数和返回值使用显式类型 - 复杂数据结构使用接口 ### 导入 - 使用 ES 模块:`import { defineUserConfig } from "vuepress"` - 分组导入:框架优先,本地其次 - 使用 config.ts 中定义的路径别名 ### Vue 组件 - 使用 Vue 3 Composition API 和 `