关闭

Tryaivo™技术

作者Person标记抽检7站:只有1站写了sameAs

0 浏览:

导语:在 BlogPosting / NewsArticle 的 author 里打 Person 已经成了大站标配——7 个样本里 5 个有 Person 节点,但按"文章作者"口径下去核,只有 1 个给了 sameAs、0 个给了 jobTitle。Google 的校验器对这一切全部绿灯,这就是"沉默失败"的现场。

背景:坑已经从"author 写字符串"进化了

两年前的文章都在讲同一件事:"author": "张三" 是字符串,改成一个 Person 对象。这确实是当年最大的坑。

现在这个坑基本填完了——本次抽检 7 个站点,没有一个把 author 写成裸字符串。但它们换了一个更隐蔽的形态:Person 对象有了,@id 也有了,可是没有 sameAs、没有 jobTitle、同一作者在同一页出现 3 次却是 3 个互不相干的节点。标记合法,验证器不报错,搜索引擎和 AI 拿到的却是一个没有身份锚点的名字。

为什么校验器不报错?因为 Google 的 Article 结构化数据文档写得很明确(原文):"There are no required properties; instead, add the properties that apply to your content."——Article 没有任何必填属性。没写 author 不影响合法性,写了 author 但缺 sameAs 更不影响。所以这类问题不会在 Rich Results Test 里出现红线,只能靠人工审计。

这也是为什么 sameAs 这一类字段的收益必须说得很克制:Google 自己的《面向生成式 AI 的优化指南》(2026 年 5 月发布,7 月更新)原话是 "Structured data isn't required for generative AI search, and there's no special schema.org markup you need to add."。Person 标记不是"让 AI 引用你"的开关,它解决的是另一个问题:同一个作者在文章页、作者页、外部档案三处是不是同一个实体。

落地清单:先审计,再改代码

1) 实测:7 站每站取 1 篇有效文章页

抓取时间 2026-11-27;每站取首页链出的首篇有效文章(非栏目页、非专题页),解析页面内全部 <script type="application/ld+json">,递归展开后统计 @type: Person 节点。

站点文章标记类型Person 节点数带 @idsameAsjobTitleauthor 形态
github.blogArticle + BlogPosting + TechArticle(3 块)3100混合:2 个内联 {name},1 个 {@id}
ahrefs.com/blogArticle111(3 项,含 1 项非 URL)0{name, @id}
techcrunch.comNewsArticle1100数组 [{@id}]
css-tricks.comBlogPosting1100{@id, name}
searchenginejournal.comEvent(网页级)9063speaker 内联 Person
cloudflare.com/blogBlogPosting0000无 author 字段
shopify.com/blog未检测到 JSON-LD0000—

口径说明三条,避免误读:

  • 只统计服务端 HTML 里的静态 JSON-LD,不统计浏览器运行时注入的标记。原因见下面第 4 条:主流 AI 爬虫不执行 JS。
  • search engine journal 那篇取到的是活动页,Person 挂在 Event 的 speaker 上,不是文章作者,所以它的 sameAs 6 项不能算作"文章作者标记做得好",本表单列一行,不计入下面的覆盖率分母口径时单独说明。
  • shopify.com/blog 未检测到 application/ld+json 脚本块——仅代表静态 HTML 里没有,不排除其通过前端框架在客户端注入。

按"文章页 / 作者 Person"口径统计(分母 5:github、ahrefs、techcrunch、css-tricks、cloudflare):

观测项结果
有 Person 作者节点4 站(80%)
author 写成裸字符串0 站(0%)
Person 带 @id4 站(80%)
Person 带 sameAs1 站(20%)
Person 带 jobTitle0 站(0%)
同页出现多个文章型节点(Article/BlogPosting/TechArticle 并存)1 站(github.blog,3 个)
同页同一作者出现多个 Person 节点1 站(github.blog,3 个节点仅 1 个带 @id)
完全缺失 author 字段1 站(cloudflare.com/blog)

2) 反例原文:GitHub Blog 的 3 个"同一个人"

github.blog 那篇文章的页面里有 3 个 application/ld+json 脚本块,展开后 31 个节点,其中 Person 节点 3 个,同属一位作者。原文(截取关键字段,未改写):

{"@type": "Person", "name": "Jeimy Ruiz"}
{
  "@type": "Person",
  "@id": "https://github.blog/#/schema/person/254d6e0f5288fd51a2b0081edcd5fe0b",
  "name": "Jeimy Ruiz",
  "image": {"@type": "ImageObject", "url": "https://secure.gravatar.com/avatar/...s=96&d=mm&r=g"},
  "url": "https://github.blog/author/ruizjeimy/"
}

同一页里,前两块是 {"@type":"Person","name":"..."} 的内联对象——没有 @id,没有 url,没有 image;第三块才是带 @id 和作者页 url 的完整节点。三个节点描述的是同一个人,图里却有 3 个独立实体,没有任何一条边把它们连起来。

同时该页并排放了 3 个文章型节点:

article_types: ["Article", "BlogPosting", "TechArticle"]

一个页面声明了三次"这是一篇文章"。这不是致命错误(三者都是 Article 的子类型),但它意味着 datePublished、headline、author 被重复声明了 3 次,任何一处不一致都会让下游抓到不同版本。

3) 另一个真实缺陷:sameAs 里混进非 URL

ahrefs.com/blog 是全样本里唯一写全 sameAs 的站,但脚本审计出一个问题:

"sameAs": [
  "https://www.siquanong.com/",
  "si-quan-ong",
  "https://x.com/siquanong"
]

第二项 "si-quan-ong" 是一个裸 handle 字符串,不是 URL。sameAs 的值域要求是 URL——它存在的意义就是"能点开、能核对"。裸字符串等于一个断链,验证器不报错,但下游无法解析为实体引用。

顺带一个值得抄的细节:这个站的 @id 用了 https://ahrefs.com/blog/#/schema/person/<hash> 这种带站点根锚点的写法,而不是作者页 URL。好处是稳定(改了作者页 slug 也不会断),代价是多一层跳转才能到「本人」。css-tricks.com 则相反,直接用作者页 URL 当 @id:

{
  "@type": "Person",
  "@id": "https://css-tricks.com/author/leemeyer/",
  "name": "Lee Meyer",
  "url": "https://css-tricks.com/author/leemeyer/",
  "worksFor": {"@id": "https://css-tricks.com/#organization"}
}

它有 @id、有 url、有 worksFor 指向组织节点——是目前"最少字段但结构自洽"的写法。缺点是缺 sameAs 和 jobTitle,且 @id 与 url 同值这件事意味着作者页一旦改 path,历史文章里的引用全部失效。

4) 修复版:一个自洽的 Person + 作者页对齐

选用的 @type:Person,嵌在 BlogPosting.author。字段按 Schema.org 现行版(查询于 2026-11-27;当日抓取 schema.org 官方 releases 页超时,未取到具体版本号,故按"现行版"标注,字段集合与 Google Article 文档推荐项一致)。

推荐字段清单(源于 Google Article 文档 + schema.org Person 定义):@id(必给,作为实体锚点)、name(只放名字)、url(指向作者页)、sameAs(全部为 URL 的外部档案)、jobTitle、worksFor。

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "文章标题",
  "description": "文章摘要",
  "image": ["https://your.site/img/cover-16x9.jpg"],
  "datePublished": "2026-11-27T09:00:00+08:00",
  "dateModified": "2026-11-27T09:00:00+08:00",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://your.site/blog/article-slug"
  },
  "author": {
    "@type": "Person",
    "@id": "https://your.site/authors/zhang-san#person",
    "name": "张三",
    "url": "https://your.site/authors/zhang-san",
    "jobTitle": "技术编辑",
    "worksFor": { "@id": "https://your.site/#organization" },
    "sameAs": [
      "https://github.com/zhang-san-example",
      "https://x.com/zhang_san_example"
    ]
  },
  "publisher": {
    "@type": "Organization",
    "@id": "https://your.site/#organization",
    "name": "示例媒体",
    "logo": { "@type": "ImageObject", "url": "https://your.site/logo.png" }
  }
}

三处刻意设计:

  • @id 带 #person 片段,且与作者页的 mainEntity.@id 完全一致。这是把文章页和作者页连成一个实体的唯一可靠办法——缺这一步,作者页上写得再全,也无法和文章页对上。
  • name 里只放名字。Google 的 author 规范明确要求"Put only the name in author.name. No job title, no 'Dr.', no publisher name",角色放 jobTitle。
  • sameAs 只放绝对 URL,别学上面那个裸 handle。

作者页那侧要配 ProfilePage(Google 支持的特性,必填只有 mainEntity,其中必填只有 name):

{
  "@context": "https://schema.org",
  "@type": "ProfilePage",
  "dateModified": "2026-11-27T09:00:00+08:00",
  "mainEntity": {
    "@type": "Person",
    "@id": "https://your.site/authors/zhang-san#person",
    "name": "张三",
    "jobTitle": "技术编辑",
    "description": "负责结构化数据与站点迁移方向的内容。",
    "image": "https://your.site/img/authors/zhang-san.jpg",
    "sameAs": ["https://github.com/zhang-san-example", "https://x.com/zhang_san_example"]
  }
}

插在哪个模板节点:文章页 <head> 内联静态输出,不要靠客户端 JS 注入。原因有依据:Vercel 的爬虫研究实测 GPTBot、ClaudeBot、PerplexityBot 不执行 JavaScript——JS 注入的 JSON-LD 对这些爬虫等于不存在。SSR 框架(Next/Nuxt)在服务端模板里 JSON.stringify 后塞进 <script type="application/ld+json">,然后务必用 view-source 确认,不要在 DevTools 里看(DevTools 看到的是运行后的 DOM,会骗你)。

5) 验证:两个官方工具 + 一段自查脚本

官方两步:

  1. Rich Results Test(贴 URL,不贴代码)——让 Google 真的去抓取渲染,Article 应被识别且无错误;作者页上应识别出 ProfilePage。
  2. Schema Markup Validator(validator.schema.org)——按 schema.org 本身校验,能抓到 Google 工具忽略的类型与属性错误。

但这两个工具都不会告诉你 sameAs 里有裸字符串、也不会告诉你同一页有 3 个 Person 节点是同一个人的重复声明——它们只判合法,不判实体质量。所以补一段自查脚本(本次审计实际使用的就是它,可直接跑):

import re, json, urllib.request

HDR = {"User-Agent": "Mozilla/5.0 (compatible; schema-lint/1.0)"}

def fetch(u):
    with urllib.request.urlopen(urllib.request.Request(u, headers=HDR), timeout=20) as r:
        return r.read().decode("utf-8", "ignore")

def nodes_of(html):
    flat = []
    def walk(n):
        if isinstance(n, dict):
            flat.append(n)
            for v in n.values():
                walk(v)
        elif isinstance(n, list):
            for v in n:
                walk(v)
    for m in re.finditer(r'<script[^>]+application/ld\+json[^>]*>(.*?)</script>', html, re.S | re.I):
        try:
            walk(json.loads(m.group(1).strip()))
        except Exception:
            pass
    return flat

def lint(url):
    ns = nodes_of(fetch(url))
    persons = [n for n in ns if n.get("@type") == "Person"]
    ids = {n["@id"] for n in persons if n.get("@id")}
    bad_sameas = [s for p in persons
                  for s in ([p["sameAs"]] if isinstance(p.get("sameAs"), str) else (p.get("sameAs") or []))
                  if not re.match(r"^https?://", str(s))]
    dangling = []
    for n in ns:
        a = n.get("author")
        for x in (a if isinstance(a, list) else [a]):
            if isinstance(x, dict) and set(x) <= {"@id"} and x["@id"] not in ids:
                dangling.append(x["@id"])
    return {
        "url": url,
        "ld_scripts": fetch(url).count("application/ld+json"),
        "person_nodes": len(persons),
        "person_with_id": len(ids),
        "sameAs_not_url": bad_sameas,
        "dangling_author_ref": dangling,
        "article_types": sorted({n.get("@type") for n in ns
                                 if n.get("@type") in ("Article", "BlogPosting", "NewsArticle", "TechArticle")}),
    }

print(json.dumps(lint("https://github.blog/ai-and-ml/generative-ai/how-ai-code-generation-works/"),
                 ensure_ascii=False, indent=1))

本次对 4 个站点实跑的输出(原样):

{"url": "https://github.blog/ai-and-ml/...", "ld_scripts": 3, "nodes": 31, "person_nodes": 3, "person_with_id": 1, "unique_person_ids": 1, "sameAs_non_url": [], "dangling_author_ref": [], "article_types": ["Article", "BlogPosting", "TechArticle"]}
{"url": "https://ahrefs.com/blog/most-mentioned-brands-chatgpt/", "ld_scripts": 1, "nodes": 23, "person_nodes": 1, "person_with_id": 1, "unique_person_ids": 1, "sameAs_non_url": ["si-quan-ong"], "dangling_author_ref": [], "article_types": ["Article"]}
{"url": "https://techcrunch.com/2026/11/25/...", "ld_scripts": 1, "nodes": 29, "person_nodes": 1, "person_with_id": 1, "unique_person_ids": 1, "sameAs_non_url": [], "dangling_author_ref": [], "article_types": ["NewsArticle"]}
{"url": "https://css-tricks.com/css-random-function-polyfill/", "ld_scripts": 1, "nodes": 18, "person_nodes": 1, "person_with_id": 1, "unique_person_ids": 1, "sameAs_non_url": [], "dangling_author_ref": [], "article_types": ["BlogPosting"]}

判读标准:person_nodes == person_with_id(不缺锚点)、sameAs_not_url == []、dangling_author_ref == []、article_types 长度 1。github.blog 第一条就因为 person_nodes 3 / person_with_id 1 被抓住,ahrefs 被 sameAs_non_url 抓住——这两类问题 Rich Results Test 全都不会报。

结果:能自证的和不能自证的

本次只做审计,未做上线 A/B,所以不给 CTR、曝光、AI 引用率的数字。可以确认的:

观测项7 站样本
author 为裸字符串0 站(老坑已基本填完)
有 Person 节点但缺 sameAs4 站
缺 jobTitle全部(0 站有)
同页 Person 节点数 ≠ 带 @id 节点数1 站(github.blog,3 : 1)
同页文章型节点重复声明1 站(github.blog,3 种)
sameAs 含非 URL 值1 站(ahrefs.com/blog)
完全缺 author 字段1 站(cloudflare.com/blog)

定性结论:大站的 Person 标记正在从"有没有"阶段进入"对不对得上"阶段。字符合法性几乎全部通过,实体对齐普遍没做。对 AI 侧的影响只能说方向:一个没有 @id、没有 sameAs 的作者名,是一个无法与外部档案交叉验证的孤立字符串;补上锚点后,至少"这个作者是谁、在哪还能找到他"变成可核对的事实。

收益预期请保持克制。Google 明确说生成式 AI 搜索不要求结构化数据;Cyrus Shepard 的 AI 引用排名因素复盘(Zyppy,2026 年 5 月)给结构化数据打分 5.6/10,并指出多项研究只发现"小的正相关",没有任何研究把 schema 单独认定为因。真正撑住作者身份的是作者页本身——真实简介、真实照片、能对得上的外部档案。标记只是让这些证据变得可核对。

复盘

可以直接抄的 3 条动作

  1. 一个作者一个 @id,全文复用:文章页 author.@id 与作者页 mainEntity.@id 用同一个带片段标识的 URL(如 #person)。这是把散落的 Person 节点收敛成实体的唯一办法,也是 github.blog 那种"同页 3 个节点"问题的正解。
  2. sameAs 只放能点开的绝对 URL,每一项都要人工点开确认"是同一个人、同一个身份"。放不进 URL 的 handle 宁可不写。
  3. 发布前跑一次静态审计脚本(本文第 5 节),把 person_nodes == person_with_id、sameAs 全为 URL、无悬空 @id 当三条硬门禁,比只看 Rich Results Test 绿勾有用得多。

两条红线

  • 别把职位、头衔、机构名塞进 author.name。"name": "张三,技术编辑 @ 示例媒体" 是合法 JSON-LD,也是错的写法——Google 要求 name 只放名字,角色放 jobTitle,雇主放 worksFor。
  • 别用 JS 注入 JSON-LD 然后骗自己"已经打了标记"。GPTBot、ClaudeBot、PerplexityBot 不执行 JavaScript,客户端注入的标记对这些爬虫等于不存在。判断方式不是看 DevTools,是看 view-source。

标注

  • @type:Person(嵌于 BlogPosting / NewsArticle 的 author),配套作者页 ProfilePage + mainEntity。
  • Schema.org 版本:现行版,查询于 2026-11-27(当日 schema.org 官方 releases 页抓取超时,未取到具体版本号;字段集合与 Google Article 文档推荐项、schema.org Person 定义一致)。
  • 验证工具与时间:Google Rich Results Test(网页版)、Schema Markup Validator(validator.schema.org)、本文第 5 节自查脚本;审计执行时间 2026-11-27。
  • 数据口径:2026-11-27 抓取 7 个站点各 1 篇有效文章页,只统计服务端静态 JSON-LD;搜索量、点击率、AI 引用率均未测量,文中不含此类数字。Google 文档引文("no required properties"、"Structured data isn't required for generative AI search")出自 Google Search Central Article 结构化数据文档与《面向生成式 AI 的优化指南》(2026 年 5 月发布、7 月更新)。Zyppy 结构化数据 5.6/10 评分为第三方研究口径,非本站复现。Vercel 爬虫不执行 JS 的结论来自其公开爬虫研究,非本站复现。
  • 复盘时间:2026-11-27。

#Schema.org #结构化数据 #JSON-LD #AI可见度 #GEO #Person