feat: 首页由 navigation 首项决定

- 移除 navigation.active 配置项,默认页以 navigation[0] 为准(生成端/前端一致)
- 注入 homePageId;首页渲染用 profile.title/profile.subtitle 覆盖 title/subtitle
- 模板按 homePageId 切换首页/非首页标题 DOM 与 data-editable,避免样式错位
- 更新默认配置与文档;书签导入不再写入 active 字段
- 新增/更新单测覆盖首页规则与 profile 覆盖

BREAKING CHANGE: 不再支持 navigation[].active;通过调整 navigation 顺序设置默认页/首页
This commit is contained in:
rbetree
2025-12-26 11:04:40 +08:00
parent 9929358d56
commit 704e895773
12 changed files with 173 additions and 35 deletions

View File

@@ -50,12 +50,11 @@ social:
url: https://steam.com
icon: fab fa-steam
# 导航配置
# 导航配置(顺序第一项即首页/默认打开页)
navigation:
- name: 首页 # 菜单名称
icon: fas fa-home # Font Awesome 图标类
id: home # 页面标识符(唯一,需与 pages/home.yml 对应)
active: true # 是否默认激活(全局仅一个 true
- name: 常用 # 菜单名称
icon: fas fa-star # Font Awesome 图标类
id: home # 页面标识符(唯一,需与 pages/<id>.yml 对应)
- name: 项目
icon: fas fa-project-diagram
id: projects