Skip to content
返回发布与可发现性

发布时结构化数据

为新页加 JSON-LD 结构化数据(TechArticle、BreadcrumbList、FAQPage、Organization)使 Google 显富结果且 AI 搜索能解析你内容。

为什么

结构化数据(JSON-LD)是 Google 和 AI 搜索引擎(ChatGPT、Perplexity、Claude)用来理解你页关于什么的语言。TechArticle schema 告 Google"这是技术文章有此 headline 和此 description",使它有资格富结果(更大摘要、"type"标)增点击率 15-30%。FAQPage schema 把你 FAQ 节转可展开富结果可直接现搜索结果中,在用户甚至访你站前捕点击。对 AI 搜索,结构化数据更关键:当 Perplexity 或 ChatGPT 引你页为源时,它们解析 JSON-LD 抽 headline、description 和关键事实 — 无结构化数据的页不太可能被引。发布时为所有 30 新 /launch 页加结构化数据花 2 小时且在富结果和 AI 引用中复利数年。

何时使用

构建期间,在 Astro 组件 head。发布前用 Google Rich Results Test 验、发布后监 Search Console"Enhancements"报告。

如何做

1. 每文章页(/launch/[slug])加 TechArticle schema:
   { "@context": "https://schema.org", "@type": "TechArticle", "headline": title, "description": description, "url": canonical, "inLanguage": locale, "datePublished": launchDate, "author": { "@type": "Organization", "name": "EZ4Code" } }
2. 列表页(/launch)加 CollectionPage schema:
   { "@context": "https://schema.org", "@type": "CollectionPage", "name": "Launch & Discoverability", "description": ..., "url": canonical, "hasPart": [文章 URL 数组] }
3. 每有面包屑的页加 BreadcrumbList schema:
   { "@type": "BreadcrumbList", "itemListElement": [ { 位 1:Home }, { 位 2:Launch }, { 位 3:文章标题 } ] }
4. 有 FAQ 节的页加 FAQPage schema:
   { "@type": "FAQPage", "mainEntity": [ { "@type": "Question", "name": 问题, "acceptedAnswer": { "@type": "Answer", "text": 答案 } } ] }
5. 首页加 Organization schema(一次非每页):
   { "@type": "Organization", "name": "EZ4Code", "url": "https://ez4code.com", "logo": "https://ez4code.com/logo.png", "sameAs": [twitter, github] }
6. 经 Astro head 中 <script type="application/ld+json"> 注 JSON-LD — Astro 构建时渲染此故在 HTML 中给爬虫
7. 用 Google Rich Results Test(search.google.com/test/rich-results)在 3-5 新 URL 验 — 它示检测到哪些 schema 型和任何错
8. 发布后监 Search Console > Enhancements >(TechArticle / FAQ / Breadcrumb)— 此示多少页有有效结构化数据和任何错
9. 为 AI 搜索优化,TechArticle 加"about"和"mentions"属性链到概念实体(如"Product Hunt"、"SEO")— 此帮 AI 引擎把你内容连到主题

示例

# 结构化数据 — ez4code v2.0 /launch

## /launch/pre-launch-checklist(TechArticle)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "Pre-Launch Checklist",
  "description": "A comprehensive gate-check before opening your product...",
  "url": "https://ez4code.com/launch/pre-launch-checklist",
  "inLanguage": "en",
  "datePublished": "2026-10-05",
  "author": { "@type": "Organization", "name": "EZ4Code" },
  "about": ["product launch", "checklist", "dev tools"]
}
</script>

## /launch(CollectionPage)
{
  "@type": "CollectionPage",
  "name": "Launch & Discoverability",
  "hasPart": [
    { "@type": "TechArticle", "url": ".../pre-launch-checklist" },
    { "@type": "TechArticle", "url": ".../ph-preparation" },
    ...(30 文章)
  ]
}

## BreadcrumbList(每详情页)
{
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://ez4code.com" },
    { "@type": "ListItem", "position": 2, "name": "Launch", "item": "https://ez4code.com/launch" },
    { "@type": "ListItem", "position": 3, "name": "Pre-Launch Checklist" }
  ]
}

## 验证(Rich Results Test)
/launch/pre-launch-checklist:
  ✓ TechArticle 检测
  ✓ BreadcrumbList 检测
  ✓ FAQPage 检测(3 问)
  0 错

## 发布后(Search Console Enhancements)
TechArticle:30 有效、0 错
Breadcrumb:30 有效、0 错
FAQ:28 有效、2 错(缺 acceptedAnswer.text)→ 已修

## AI 搜索影响
Perplexity 引 /launch/pre-launch-checklist 答"如何发布开发工具"
ChatGPT 引 /launch/ph-preparation 答"Product Hunt 发布指南"

常见问题

  • ⚠经客户端 JS 注 JSON-LD — Google 爬虫可能不执行 JS 故结构化数据隐形;经 Astro 构建时 <script> 标注使在静态 HTML。
  • ⚠缺必需字段 — TechArticle 需 headline 和 description;FAQPage 需每 Question 有带 text 的 acceptedAnswer;缺字段使 schema 无效且 Google 全忽。
  • ⚠重复结构化数据 — 同 TechArticle schema 注两次(布局一次、页一次)造冲突;每 schema 型每页注一次。
  • ⚠发布前无验证 — "看起来对"非验证;每新页型跑 Rich Results Test,因单无效字段使全 schema 无效且你失所有富结果资格。

最佳实践

  • ✓从数据模型(驱页内容的同 LaunchItem)生成 JSON-LD — 此确保 schema 总配页内容且永不旧。
  • ✓发布前用 Rich Results Test 验每页型非仅一 — 列表页、详情页、FAQ 节各有不同 schema 且各须分别验。
  • ✓加链到概念实体的"about"和"mentions"属性 — 此是帮 Perplexity 和 ChatGPT 把你页连到用户问主题的 AI 搜索优化。
  • ✓首月每周监 Search Console Enhancements — 结构化数据错 2 周内现此且单无效页可若为复发模式使全 schema 型无效。