web-projects/README.md
WangDL bd570d5fb3 feat: init longde website project
- Astro 静态网站
- 首页、学习产品介绍
- 等待名单表单
- 隐私政策、用户协议、支持、下载、更新日志页面
- SEO 优化 (sitemap, robots, OG)
2026-05-04 15:22:20 +08:00

93 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 龙德AI学习 官网
AI 学习产品的官方网站,基于 Astro + TypeScript 构建。
## 技术栈
- **框架**: Astro 5.x
- **语言**: TypeScript
- **样式**: 原生 CSSApple 风格)
## 页面结构
- `/` - 首页
- `/privacy` - 隐私政策
- `/terms` - 用户协议
- `/support` - 支持与反馈
- `/waitlist` - 等待名单
- `/changelog` - 更新日志
- `/download` - Mac 下载页
## 快速开始
### 安装依赖
```bash
npm install
```
### 启动开发服务器
```bash
npm run dev
```
访问 http://localhost:4321
### 其他命令
| 命令 | 说明 |
|------|------|
| `npm run dev` | 启动开发服务器 |
| `npm run build` | 构建生产版本 |
| `npm run preview` | 预览生产版本 |
| `npm run astro` | 运行 Astro CLI |
## 环境变量
复制 `.env.example``.env` 并根据需要修改:
```bash
cp .env.example .env
```
| 变量 | 默认值 | 说明 |
|------|--------|------|
| `SITE_URL` | http://localhost:4321 | 站点地址SEO 和 sitemap 使用)|
| `HOST` | localhost | 服务器主机 |
| `PORT` | 4321 | 服务器端口 |
## 项目结构
```
├── src/
│ ├── components/ # 组件
│ │ ├── Header.astro
│ │ ├── Footer.astro
│ │ ├── Hero.astro
│ │ ├── FeatureCard.astro
│ │ ├── CTA.astro
│ │ └── WaitlistForm.astro
│ ├── layouts/ # 布局
│ │ └── BaseLayout.astro
│ └── pages/ # 页面
│ ├── index.astro
│ ├── privacy.astro
│ ├── terms.astro
│ ├── support.astro
│ ├── waitlist.astro
│ ├── changelog.astro
│ └── download.astro
├── public/ # 静态文件
│ ├── favicon.svg
│ └── robots.txt
├── astro.config.mjs
├── tsconfig.json
└── package.json
```
## 注意事项
- 域名 `longde.cloud` 正在备案中,所有 URL 使用环境变量管理
- 等待名单表单当前为 Mock 模式,后端接入后修改 `WaitlistForm.astro`
- SEO 配置在 `BaseLayout.astro` 中统一管理