feat(icons): 添加favicon模式,自动匹配图标
- 新增配置 icons.mode(manual | favicon),默认 favicon,未配置场景下自动生效 - 模板调用 t3.gstatic.com/faviconV2 获取站点图标;加载中显示旋转占位,失败回退至 Font Awesome 图标 - 新增 ifHttpUrl 与 encodeURIComponent,提升模板安全性与可读性 - 搜索索引优先读取 .icon-fallback,保证 favicon 模式下图标类名一致 - 样式新增 .favicon-icon 与 hover 效果,维持卡片观感一致性
This commit is contained in:
@@ -303,6 +303,10 @@ function ensureConfigDefaults(config) {
|
||||
result.profile = result.profile || {};
|
||||
result.social = result.social || [];
|
||||
result.categories = result.categories || [];
|
||||
// 图标配置默认值
|
||||
result.icons = result.icons || {};
|
||||
// icons.mode: manual | favicon, 默认 favicon
|
||||
result.icons.mode = result.icons.mode || 'favicon';
|
||||
|
||||
// 站点基本信息默认值
|
||||
result.site.title = result.site.title || 'MeNav导航';
|
||||
|
||||
Reference in New Issue
Block a user