公开页补齐自引用 Canonical 与按类型的结构化数据,图片补上说明文字。
后台设置和内容编辑改成可导航布局;部署用访客 origin 生成 Canonical,避免落到容器地址。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import { accentStyleCSS } from "@/lib/theme";
|
||||
import { bgConfigFromSettings, bgStyleCSS } from "@/lib/bg";
|
||||
import { siteDocumentTitle } from "@/lib/brand";
|
||||
import { motionConfigFromSettings } from "@/lib/motion";
|
||||
import { requestMetadataBase } from "@/lib/canonicalMeta";
|
||||
|
||||
// 构建期下载并自托管字体:同源加载 + 自动 preload + fallback 度量校正,
|
||||
// 消除 F5 时 Google CDN 字体到达后整页"由粗变细"的 FOUT 闪动
|
||||
@@ -52,7 +53,10 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
const title = siteDocumentTitle(name, settings.site_slogan || "");
|
||||
const desc = settings.site_description || "姜十三论坛 - 技术分享与讨论社区";
|
||||
const keywords = settings.site_keywords?.length ? settings.site_keywords : undefined;
|
||||
const metadataBase = await requestMetadataBase();
|
||||
return {
|
||||
// 只提供解析相对 URL 的基址;Canonical 由各公开页自行声明,避免子路由继承首页
|
||||
...(metadataBase ? { metadataBase } : {}),
|
||||
title: {
|
||||
default: title,
|
||||
template: `%s · ${name}`,
|
||||
|
||||
Reference in New Issue
Block a user