feat: 新增 icons.region 配置项&修改 favicon 加载超时机制&修复去除硬编码

- 新增 icons.region: com | cn 配置项,允许用户选择优先使用国内源或国外源
  - com: 优先 gstatic.com,失败回退 gstatic.cn
  - cn: 优先 gstatic.cn,失败回退 gstatic.com
- 修改 favicon 加载超时判断机制
  - 自定义 faviconUrl: 5秒超时后显示回退图标
  - 自动 favicon: 每次尝试3秒超时,最多等待6秒
- 更新配置文档和默认配置示例
- 去除卡片模板中的url硬编码
Issue: #31
This commit is contained in:
rbetree
2026-01-03 16:43:50 +08:00
parent 87b4cea290
commit 3473aaebd7
7 changed files with 127 additions and 13 deletions

View File

@@ -307,6 +307,8 @@ function ensureConfigDefaults(config) {
result.icons = result.icons || {};
// icons.mode: manual | favicon, 默认 favicon
result.icons.mode = result.icons.mode || 'favicon';
// icons.region: com | cn, 默认 com优先使用 gstatic.com失败后回退到 gstatic.cn
result.icons.region = result.icons.region || 'com';
// 站点基本信息默认值
result.site.title = result.site.title || 'MeNav导航';