网站配置
页脚菜单
配置 Web Footer 的产品、资源、公司和账户链接。
Web Footer 位于:
apps/web/src/pages/_app/-components/layout/footer/index.tsx链接分组
Footer 把链接分成四组:
| 分组 | 当前来源 |
|---|---|
| 产品 | 首页、Projects、Search、Product AI |
| 资源 | Blog、Changelog、Newsletter |
| 公司 | Privacy、Cookie 等 Git Legal 页面 |
| 账户 | Favorites、User Assets、Developer API、隐私偏好 |
每组都根据 Manifest/profile 只渲染当前构建中真实存在的路由。空分组不会输出标题或占位列。
修改链接
固定的内部链接使用 FooterLink:
type FooterLink = {
label: string
to: string
}添加入口时:
- 复用严格消息
t()生成 label。 - 把链接放入语义正确的分组。
- 若 route 可关闭,使用已有 feature gate 或 profile export。
- 确保关闭能力后链接、路由和客户端代码一起消失。
Legal 与 Consent
Legal 链接只在 features.content.legal 开启时显示,并指向 Git 管理的公开政策页面。隐私偏好不是普通 route,而是由 ConsentPreferencesTrigger 打开共享 Dialog;不要替换为不存在的 URL。
品牌说明
Footer 品牌名来自 Manifest 生成的 APP_BRAND,说明文案来自 footer.disclaimer。Logo 图形复用 Web DeviconYunohost 组件,不在 Footer 内复制 SVG。
外部链接
当前 FooterLink 是内部路由合同。若新增 GitHub、X 或其他外部站点,请使用明确的 <a href>、安全的新窗口属性和品牌 Iconify 图标,详见 社交媒体。
验证
pnpm --filter web typecheck
pnpm --filter web build
pnpm test:profiles重点检查桌面四列布局、窄屏换行、键盘焦点,以及不同 Capability Profile 下空分组是否被移除。