Skip to content

Commit d739e5e

Browse files
committed
readme: 增加todo模块
1 parent 07203af commit d739e5e

2 files changed

Lines changed: 128 additions & 421 deletions

File tree

README.md

Lines changed: 128 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,153 @@
11
# Bluemsun Site (Astro + Bun)
22

3-
蓝旭官网使用 Astro + TOML 页面编排,日常维护入口固定为三类:
3+
蓝旭工作室官网项目,采用 **Astro + 内容集合 + TOML 页面编排**
4+
当前站点包含首页、关于、报名、博客、新闻、项目模块,支持 Markdown 内容发布与静态构建。
45

5-
1. 全站配置:`src/config/site.ts`
6-
2. 页面编排:`src/config/pages/*.toml`
7-
3. 内容目录:`src/content/blog/**`(同理可维护 `news` / `projects`
6+
## TODO 列表:
87

9-
## 技术栈
8+
- [ ] 列表页增加布局切换(每行 2/3/4 列,可记忆用户选择)
9+
- [ ] 优化文章封面展示(统一比例、兜底图、列表/详情图策略一致)
10+
- [ ] 优化文章代码块主题(语法高亮 + 深浅色方案)
11+
- [ ] 全站文案与间距节奏优化(标题、副标题、按钮、空态)
12+
- [ ] 丰富关于页内容,并在报名页增加技术栈跳转入口
1013

11-
- 包管理:`bun`
12-
- 框架:`astro`
13-
- 样式:`tailwindcss`(蓝白主题基线)
14-
- 动效:`react` + `motion`(局部 islands)
15-
- 配置解析:`smol-toml` + `zod`
14+
- [ ] 接入评论系统(先第三方托管方案,后续可切自建)
15+
- [ ] 新增匿名吐槽/问题收集页(轻反馈入口)
16+
- [ ] 报名页增加“常见问题 / 团队技术栈”联动说明
17+
- [ ] 内容详情页增加相关推荐与互动引导(点赞、分享、评论)
1618

17-
## 目录结构
19+
- [ ] 设计投稿系统 MVP(前台投稿 + 后台审核流)
20+
- [ ] 梳理后端需求:鉴权、草稿、审核状态、通知
21+
- [ ] 将投稿系统拆分为独立服务或独立项目(与官网解耦)
22+
- [ ] 为内容实体补充 SEO 与统计字段(阅读量、推荐位、来源)
23+
24+
## 快速开始
25+
26+
### 环境要求
27+
28+
- Node.js `>= 22.12.0`
29+
- Bun `1.3.11+`
30+
31+
### 安装与开发
32+
33+
```bash
34+
bun install
35+
bun run dev
36+
```
37+
38+
### 检查与构建
39+
40+
```bash
41+
bun run check
42+
bun run build
43+
bun run preview
44+
```
45+
46+
## 环境变量
47+
48+
参考 `.env.example`
49+
50+
```env
51+
PUBLIC_JOIN_FORM_ENDPOINT=https://example.com/form-endpoint
52+
```
53+
54+
`JoinFormSection` 会优先读取 `PUBLIC_JOIN_FORM_ENDPOINT`,未配置时回退到组件内默认提交地址。
55+
56+
## 项目结构(与当前 src 对齐)
1857

1958
```text
2059
src/
60+
components/
61+
cards/ # 内容卡片
62+
common/ # 表单通用组件(Input/Select/Modal 等)
63+
composition/ # 页面编排入口(PageComposer)
64+
content/ # 内容列表与文章容器
65+
motion/ # React + motion 动效 islands
66+
sections/ # 各类页面 section
67+
ui/ # Header/Footer/SurfaceCard 等基础 UI
2168
config/
22-
site.ts
23-
pages/*.toml
69+
site.ts # 站点信息、导航、主题色
70+
pages/*.toml # 页面编排配置(home/about/join)
2471
content/
25-
blog/
26-
news/
27-
projects/
28-
components/
29-
composition/PageComposer.astro
30-
motion/*.tsx
31-
sections/*.astro
72+
blog/ # 博客 Markdown
73+
news/ # 新闻 Markdown
74+
projects/ # 项目 Markdown
75+
layouts/
76+
MainLayout.astro # 全站布局
3277
lib/
33-
page-composition.ts
34-
collections.ts
78+
collections.ts # 内容读取、过滤、排序
79+
page-composition.ts # TOML 解析 + schema 校验
80+
pages/
81+
index.astro
82+
about.astro
83+
join.astro
84+
blog/**
85+
news/**
86+
projects/**
87+
styles/
88+
global.css # Tailwind v4 + 全局样式
3589
```
3690

37-
## 页面编排亮点
91+
## 页面编排机制
3892

39-
- TOML section 组合渲染
40-
- 支持 `gallery` 照片墙 section
41-
- `collectionPreview` 支持首页筛选:`homepageOnly = true`
93+
- 页面入口:`src/pages/index.astro` / `about.astro` / `join.astro`
94+
- 页面配置:`src/config/pages/*.toml`
95+
- 解析与校验:`src/lib/page-composition.ts``smol-toml` + `zod`
96+
- 渲染分发:`src/components/composition/PageComposer.astro`
4297

43-
## 内容字段(新增)
98+
当前支持 section 类型:
4499

45-
`src/content.config.ts` 中,`blog/news/projects` 统一支持:
100+
- `hero`
101+
- `featureGrid`
102+
- `stats`
103+
- `collectionPreview`
104+
- `gallery`
105+
- `richText`
106+
- `joinForm`
107+
- `cta`
46108

47-
- `homepage: boolean`:是否出现在首页聚合区
48-
- `sticky: number`:首页聚合优先级(越小越靠前)
109+
## 内容系统
49110

50-
排序规则:`sticky` 升序 -> `date` 降序。
111+
`src/content.config.ts` 中定义了 `blog/news/projects` 三个集合,共享基础字段:
51112

52-
## 性能策略
113+
- `title`
114+
- `description?`
115+
- `date`
116+
- `updated?`
117+
- `author?`
118+
- `image?`
119+
- `tags[]`
120+
- `categories[]`
121+
- `homepage`(是否可进入首页聚合)
122+
- `sticky`(置顶优先级,越小越靠前)
123+
- `featured`
124+
- `draft`
53125

54-
- 首屏保持 Astro 静态渲染
55-
- 动效组件采用局部 hydration(`client:idle` / `client:visible`
56-
- 照片墙图片默认懒加载(`loading="lazy"`
57-
- 建议将图片压缩后放入 `public/images/`
126+
额外字段:
58127

59-
## 开发命令
128+
- `blog`: `series?`
129+
- `projects`: `repo?` `demo?` `stack[]`
60130

61-
```bash
62-
bun install
63-
bun run dev
64-
bun run check
65-
bun run build
66-
```
131+
排序逻辑(`src/lib/collections.ts`):
132+
133+
1. `sticky` 升序
134+
2. `date` 降序
135+
136+
并且在生产环境自动过滤 `draft: true`
137+
138+
## 已有能力摘要
139+
140+
- Astro 静态构建输出
141+
- 基于内容集合的博客/新闻/项目列表与详情页
142+
- 标签与分类路由(博客)
143+
- 页面 section 的配置化编排
144+
- 报名表单(图片上传、前端校验、提交状态反馈)
145+
- 局部动效 islands(React + motion)
146+
147+
## 维护入口
67148

68-
## 迁移文档
149+
日常维护主要集中在三处:
69150

70-
- 页面编排:`docs/page-composition.md`
71-
- 内容迁移:`docs/content-migration.md`
72-
- 资源迁移:`docs/asset-migration.md`
151+
1. `src/config/site.ts`:站点标题、导航、主题信息
152+
2. `src/config/pages/*.toml`:页面区块结构与文案
153+
3. `src/content/**`:博客/新闻/项目内容维护

0 commit comments

Comments
 (0)