feat(seo): 结构化数据/每页元数据/列表页metadata/hreflang修正/OG分享图

- 详情页注入 Article+BreadcrumbList JSON-LD,工具页 SoftwareApplication
- 课程/技能/文章/练习 动态 generateMetadata(canonical/OG)
- 新增 skills/contents/practices/prompts/models 列表页 metadata
- 修正 hreflang(删除不存在的/en),用 next/og 生成 OG 分享图
This commit is contained in:
TradeMate Dev
2026-07-11 17:23:56 +08:00
parent 8f13604e0e
commit 09bf329544
14 changed files with 389 additions and 28 deletions
+11 -2
View File
@@ -1,6 +1,7 @@
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import Link from 'next/link';
import { SITE_URL } from '@/lib/config';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Card } from '@/components/ui/card';
@@ -73,9 +74,17 @@ export default async function ToolDetailPage({ params }: { params: { slug: strin
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: tool.name,
description: tool.description,
description: tool.description || '',
url: tool.url,
applicationCategory: 'AI工具',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web',
offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' },
publisher: {
'@type': 'Organization',
name: '宇之然 AI',
url: SITE_URL,
logo: { '@type': 'ImageObject', url: `${SITE_URL}/favicon.png` },
},
};
// 解析描述中的结构化字段