feat(extension): 缩减配置注入并输出 menav-config.json

- 构建:生成 dist/menav-config.json 供扩展按需加载
- 页面:menav-config-data 仅注入扩展元信息(configUrl/pageTemplates/icons/homePageId/allowedSchemes)
- 运行时:模板判定优先 pageTemplates,兼容旧 cfg.data[pageId].template
- 文档:更新 README 的扩展接口说明
This commit is contained in:
rbetree
2026-01-07 19:35:20 +08:00
parent a3465fe4a1
commit 8f81b430b9
5 changed files with 173 additions and 19 deletions

View File

@@ -207,7 +207,7 @@ icons:
**1. MeNav 浏览器扩展支持接口**
- 注入序列化的配置数据供扩展读取(`configJSON`
- 注入扩展元信息(`menav-config-data`)并输出 `dist/menav-config.json` 供扩展按需加载(避免把整站配置注入到 `index.html`
- 暴露 `window.MeNav` 基础能力与 DOM 数据属性,支持元素精准定位与更新
- 为扩展推送与页面联动打通基础能力