fix: 补齐书签 subgroups 渲染并对齐 README

- 修复 subgroups 生成但不展示的问题(模板渲染 + 前端结构导出)
- 更新 README:配置示例/完全替换策略/多层级说明与 helper 文档,减少重复说明
This commit is contained in:
rbetree
2025-12-22 02:08:05 +08:00
parent 2daba411ba
commit 670e73e93c
8 changed files with 222 additions and 88 deletions

View File

@@ -179,6 +179,14 @@ MeNav 的助手函数分为四类:
{{json this}}
```
#### extractDomain
从 URL 中提取“干净的域名”(不包含协议、路径与查询串),常用于站点描述兜底显示:
```handlebars
{{extractDomain url}}
```
### 条件判断函数
#### ifEquals / ifNotEquals
@@ -311,6 +319,22 @@ MeNav 的助手函数分为四类:
{{/each}}
```
#### encodeURIComponent
对字符串做 URL 组件编码,常用于拼接第三方请求参数(例如 favicon 的 `url=` 参数):
```handlebars
{{encodeURIComponent url}}
```
#### add
数字加法,用于根据层级动态计算标题级别等场景:
```handlebars
<h{{add level 1}}>...</h{{add level 1}}>
```
### 核心函数
#### escapeHtml