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:
@@ -1,7 +1,14 @@
|
||||
{{#ifEquals pageId @root.homePageId}}
|
||||
<div class="welcome-section">
|
||||
<h2 data-editable="profile-title">{{title}}</h2>
|
||||
<h3 data-editable="profile-subtitle">{{subtitle}}</h3>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="welcome-section">
|
||||
<h2 data-editable="page-title">{{title}}</h2>
|
||||
<p class="subtitle" data-editable="page-subtitle">{{subtitle}}</p>
|
||||
</div>
|
||||
{{/ifEquals}}
|
||||
{{#each categories}}
|
||||
{{> category}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
|
||||
Reference in New Issue
Block a user