fix: P0 SEO 修复(sitemap 动态化 / canonical / OG 图 / JSON-LD)

- sitemap 加入全部 published 工具详情页、分类页、博客文章(双语),每小时 revalidate
- metadata.ts 新增 absoluteUrl 助手:canonical/hreflang 与 localePrefix 'as-needed' 对齐,英文页不再指向 301;x-default 修正为默认语言 en
- 生成缺失的 public/og-image.png、icon-192.png、icon-512.png
- 工具详情页、工具列表页、博客文章页补完整 metadata(canonical/hreflang/OG)
- JSON-LD 从 next/script afterInteractive 改为原生 script 标签,进入初始 HTML

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
CoolChange.AI
2026-07-31 20:35:17 -07:00
co-authored by Claude Fable 5
parent 7fd9338f80
commit f3088e996f
9 changed files with 114 additions and 65 deletions
+4 -13
View File
@@ -1,4 +1,3 @@
import Script from 'next/script'
interface WebSiteJsonLdProps {
name: string
@@ -30,10 +29,8 @@ export function WebSiteJsonLd({ name, description, url, locale }: WebSiteJsonLdP
}
return (
<Script
id="website-jsonld"
<script
type="application/ld+json"
strategy="afterInteractive"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)
@@ -60,10 +57,8 @@ export function OrganizationJsonLd({ name, url, logo, sameAs = [] }: Organizatio
}
return (
<Script
id="organization-jsonld"
<script
type="application/ld+json"
strategy="afterInteractive"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)
@@ -103,10 +98,8 @@ export function SoftwareApplicationJsonLd({
}
return (
<Script
id="software-jsonld"
<script
type="application/ld+json"
strategy="afterInteractive"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)
@@ -143,10 +136,8 @@ export function CollectionPageJsonLd({
}
return (
<Script
id="collection-jsonld"
<script
type="application/ld+json"
strategy="afterInteractive"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)