# Wiki Frontend Chinese UI + Configurable Pins + Section Filters

Date: 2026-04-19

## Summary

在已有 workspace redesign 基础上，wiki 前端继续迭代了三块能力：
1. 首页置顶页面改为配置驱动
2. section landing 增加更细过滤能力
3. 整个前端界面语言切换为中文

## What Changed

### 1. Configurable pinned pages
- 新增配置文件：`_meta/pinned-pages.yaml`
- 首页置顶区不再硬编码，而是从该 YAML 读取
- 支持 pin 三类对象：
  - `doc`：核心文档
  - `page`：正式 wiki 页面
  - `raw`：原始资料文件
- 每项可自定义 `title` 与 `snippet`

### 2. Finer section filters
- `/section/{section}` 现在除了搜索和排序，还支持额外过滤
- 正式页面分区支持：
  - type 过滤
  - tag 过滤
- raw 分区支持：
  - preview type 过滤（如 image / pdf / markdown / text）

### 3. Chinese UI
- 工作台、分区页、page view、raw view、按钮、说明文案都已切为中文
- 保留内容页自身标题原样显示，不强行翻译现有知识内容
- 键盘快捷键保留：`/` 与 `Ctrl/Cmd+K`

## Files and Verification

### Files changed
- `~/.hermes/wiki-ui/app.py`
- `~/.hermes/wiki-ui/templates/*.html`
- `~/.hermes/wiki-ui/templates/components/*.html`
- `~/.hermes/wiki-ui/static/app.js`
- `~/.hermes/wiki-ui/tests/test_app_smoke.py`
- `~/wiki/_meta/pinned-pages.yaml`

### Verification
- `python -m py_compile /root/.hermes/wiki-ui/app.py`
- `python -m pytest /root/.hermes/wiki-ui/tests/test_app_smoke.py -q` → `8 passed`
- 本地检查通过：`/`、`/section/entities?tag=hermes`、`/section/notes?preview=markdown`、`/page/concepts/frontend-ui`、`/raw/...`
- 反代检查通过：`https://wiki.hazim.work`
