blog-schema
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBlog Schema -- JSON-LD Structured Data Generation
博客Schema -- JSON-LD结构化数据生成
Generates complete, validated JSON-LD schema markup for blog posts using the
@graph pattern. Combines multiple schema types into a single script tag with
stable @id references for entity linking.
生成完整、经过验证的博客文章JSON-LD schema标记,采用@graph模式。将多种schema类型合并到单个script标签中,并通过稳定的@id引用实现实体关联。
Workflow
工作流程
Step 1: Read Content
步骤1:读取内容
Read the blog post and extract all schema-relevant data:
- Title (headline)
- Author (name, job title, social links, credentials)
- Dates (datePublished, dateModified / lastUpdated)
- Description (meta description)
- FAQ section (question and answer pairs)
- Images (cover image URL, dimensions, alt text; inline images)
- Organization info (site name, URL, logo)
- Word count (approximate from content length)
- Tags/categories (for BreadcrumbList category)
- Slug (from filename or frontmatter)
读取博客文章并提取所有与schema相关的数据:
- 标题(headline)
- 作者(姓名、职位、社交链接、资质证明)
- 日期(datePublished发布日期、dateModified/lastUpdated修改日期)
- 描述(元描述)
- FAQ板块(问答对)
- 图片(封面图片URL、尺寸、替代文本;内联图片)
- 组织信息(站点名称、URL、Logo)
- 字数统计(根据内容长度估算)
- 标签/分类(用于BreadcrumbList分类)
- Slug(从文件名或前置元数据中获取)
Step 2: Generate BlogPosting Schema
步骤2:生成BlogPosting Schema
Complete BlogPosting with all required and recommended properties:
json
{
"@type": "BlogPosting",
"@id": "{siteUrl}/blog/{slug}#article",
"headline": "Post title (max 110 chars)",
"description": "Meta description (150-160 chars)",
"datePublished": "YYYY-MM-DD",
"dateModified": "YYYY-MM-DD",
"author": { "@id": "{siteUrl}/author/{author-slug}#person" },
"publisher": { "@id": "{siteUrl}#organization" },
"image": { "@id": "{siteUrl}/blog/{slug}#primaryimage" },
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{siteUrl}/blog/{slug}"
},
"wordCount": 2400,
"articleBody": "First 200 characters of content as excerpt..."
}Required properties: @type, headline, datePublished, author, publisher, image.
Recommended properties: description, dateModified, mainEntityOfPage, wordCount,
articleBody (excerpt).
生成包含所有必填和推荐属性的完整BlogPosting:
json
{
"@type": "BlogPosting",
"@id": "{siteUrl}/blog/{slug}#article",
"headline": "Post title (max 110 chars)",
"description": "Meta description (150-160 chars)",
"datePublished": "YYYY-MM-DD",
"dateModified": "YYYY-MM-DD",
"author": { "@id": "{siteUrl}/author/{author-slug}#person" },
"publisher": { "@id": "{siteUrl}#organization" },
"image": { "@id": "{siteUrl}/blog/{slug}#primaryimage" },
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{siteUrl}/blog/{slug}"
},
"wordCount": 2400,
"articleBody": "First 200 characters of content as excerpt..."
}必填属性:@type、headline、datePublished、author、publisher、image。
推荐属性:description、dateModified、mainEntityOfPage、wordCount、articleBody(摘要)。
Step 3: Generate Person Schema
步骤3:生成Person Schema
Author schema with stable @id for cross-referencing:
json
{
"@type": "Person",
"@id": "{siteUrl}/author/{author-slug}#person",
"name": "Author Name",
"jobTitle": "Role or Title",
"url": "{siteUrl}/author/{author-slug}",
"sameAs": [
"https://twitter.com/handle",
"https://linkedin.com/in/handle",
"https://github.com/handle"
]
}Optional properties (include when available):
- — Educational institution (Organization type)
alumniOf - — Employer (reference to Organization @id if same entity)
worksFor
生成带有稳定@id的作者schema,用于跨引用:
json
{
"@type": "Person",
"@id": "{siteUrl}/author/{author-slug}#person",
"name": "Author Name",
"jobTitle": "Role or Title",
"url": "{siteUrl}/author/{author-slug}",
"sameAs": [
"https://twitter.com/handle",
"https://linkedin.com/in/handle",
"https://github.com/handle"
]
}可选属性(如有则添加):
- — 教育机构(Organization类型)
alumniOf - — 雇主(若为同一实体,可引用Organization的@id)
worksFor
Step 4: Generate Organization Schema
步骤4:生成Organization Schema
Blog's parent organization entity:
json
{
"@type": "Organization",
"@id": "{siteUrl}#organization",
"name": "Organization Name",
"url": "{siteUrl}",
"logo": {
"@type": "ImageObject",
"url": "{siteUrl}/logo.png",
"width": 600,
"height": 60
},
"sameAs": [
"https://twitter.com/org",
"https://linkedin.com/company/org",
"https://github.com/org"
]
}Logo requirements: must be a valid image URL. Google recommends logos be
112x112px minimum, 600px wide maximum. Rectangular logos preferred for
BlogPosting publishers.
博客所属的组织实体schema:
json
{
"@type": "Organization",
"@id": "{siteUrl}#organization",
"name": "Organization Name",
"url": "{siteUrl}",
"logo": {
"@type": "ImageObject",
"url": "{siteUrl}/logo.png",
"width": 600,
"height": 60
},
"sameAs": [
"https://twitter.com/org",
"https://linkedin.com/company/org",
"https://github.com/org"
]
}Logo要求:必须是有效的图片URL。Google建议Logo最小尺寸为112x112px,最大宽度为600px。对于BlogPosting的发布方,优先使用矩形Logo。
Step 5: Generate BreadcrumbList
步骤5:生成BreadcrumbList
Navigation breadcrumb schema showing content hierarchy:
json
{
"@type": "BreadcrumbList",
"@id": "{siteUrl}/blog/{slug}#breadcrumb",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{siteUrl}"
},
{
"@type": "ListItem",
"position": 2,
"name": "Category Name",
"item": "{siteUrl}/blog/category/{category-slug}"
},
{
"@type": "ListItem",
"position": 3,
"name": "Post Title",
"item": "{siteUrl}/blog/{slug}"
}
]
}If no category is available, use "Blog" as the second breadcrumb item with
as the URL.
{siteUrl}/blog展示内容层级的导航面包屑schema:
json
{
"@type": "BreadcrumbList",
"@id": "{siteUrl}/blog/{slug}#breadcrumb",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{siteUrl}"
},
{
"@type": "ListItem",
"position": 2,
"name": "Category Name",
"item": "{siteUrl}/blog/category/{category-slug}"
},
{
"@type": "ListItem",
"position": 3,
"name": "Post Title",
"item": "{siteUrl}/blog/{slug}"
}
]
}如果没有分类信息,第二个面包屑项使用“博客”,对应URL为。
{siteUrl}/blogStep 6: Generate FAQPage Schema
步骤6:生成FAQPage Schema
Extract Q&A pairs from the blog post's FAQ section:
json
{
"@type": "FAQPage",
"@id": "{siteUrl}/blog/{slug}#faq",
"mainEntity": [
{
"@type": "Question",
"name": "What is the question?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The complete answer text (40-60 words with statistic)."
}
}
]
}Important note: Google restricted FAQ rich results to government and health
sites since August 2023. However, FAQ schema markup still provides value
because:
- AI systems (ChatGPT, Perplexity, Gemini) extract FAQ data for citations
- It structures content for future rich result eligibility changes
- It improves content organization signals
从博客文章的FAQ板块中提取问答对:
json
{
"@type": "FAQPage",
"@id": "{siteUrl}/blog/{slug}#faq",
"mainEntity": [
{
"@type": "Question",
"name": "What is the question?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The complete answer text (40-60 words with statistic)."
}
}
]
}重要提示:自2023年8月起,Google仅允许政府和医疗类网站展示FAQ富媒体结果。不过FAQ schema标记仍有价值,原因如下:
- AI系统(如ChatGPT、Perplexity、Gemini)会提取FAQ数据用于引用
- 结构化的内容可适应未来富媒体结果资格的变化
- 提升内容组织的信号权重
Step 7: Generate ImageObject
步骤7:生成ImageObject
Cover image schema for the post's primary image:
json
{
"@type": "ImageObject",
"@id": "{siteUrl}/blog/{slug}#primaryimage",
"url": "https://cdn.pixabay.com/photo/.../image.jpg",
"width": 1200,
"height": 630,
"caption": "Descriptive caption matching alt text"
}Image requirements:
- URL must be crawlable and publicly accessible
- Width and height should reflect actual image dimensions
- Caption should match or closely align with the image alt text
- Preferred dimensions: 1200x630 (OG-compatible) or 1920x1080
文章主图的封面图片schema:
json
{
"@type": "ImageObject",
"@id": "{siteUrl}/blog/{slug}#primaryimage",
"url": "https://cdn.pixabay.com/photo/.../image.jpg",
"width": 1200,
"height": 630,
"caption": "Descriptive caption matching alt text"
}图片要求:
- URL必须可被爬虫抓取且公开可访问
- 宽度和高度需与图片实际尺寸一致
- 图片说明应与替代文本匹配或高度相关
- 推荐尺寸:1200x630(兼容OG协议)或1920x1080
Step 8: Validate & Warn
步骤8:验证与警告
Check for deprecated schema types and apply validation rules:
NEVER use these deprecated types:
- HowTo — Deprecated September 2023 (Google no longer shows rich results)
- SpecialAnnouncement — Deprecated July 2025
- Practice Problem — Deprecated (education markup)
- Dataset — Deprecated for general use
- Sitelinks Search Box — Deprecated
- Q&A — Deprecated January 2026 (distinct from FAQPage)
Validation checks:
- All @id references resolve to entities within the @graph
- dateModified is equal to or after datePublished
- headline does not exceed 110 characters
- description is between 50-160 characters
- All URLs are absolute (not relative)
- Image dimensions are positive integers
- BreadcrumbList positions are sequential starting from 1
- FAQPage has at least 2 questions
AI citation optimization note: Pages using 3 or more schema types have
approximately 13% higher AI citation likelihood. This skill generates 6 types
by default (BlogPosting, Person, Organization, BreadcrumbList, FAQPage,
ImageObject) to maximize both search engine understanding and AI extraction.
检查已废弃的schema类型并应用验证规则:
禁止使用以下已废弃类型:
- HowTo — 2023年9月废弃(Google不再展示相关富媒体结果)
- SpecialAnnouncement — 2025年7月废弃
- Practice Problem — 已废弃(教育类标记)
- Dataset — 已废弃,不适合通用场景
- Sitelinks Search Box — 已废弃
- Q&A — 2026年1月废弃(与FAQPage不同)
验证检查项:
- 所有@id引用均可关联到@graph中的实体
- dateModified日期不早于datePublished日期
- headline长度不超过110字符
- description长度在50-160字符之间
- 所有URL均为绝对路径(而非相对路径)
- 图片尺寸为正整数
- BreadcrumbList的position从1开始连续递增
- FAQPage至少包含2个问题
AI引用优化提示: 使用3种及以上schema类型的页面,被AI引用的概率约高出13%。本技能默认生成6种类型(BlogPosting、Person、Organization、BreadcrumbList、FAQPage、ImageObject),以最大化搜索引擎的理解度和AI提取的概率。
Step 9: Output
步骤9:输出
Combine all schemas into a single tag using the @graph pattern:
<script>html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "BlogPosting", ... },
{ "@type": "Person", ... },
{ "@type": "Organization", ... },
{ "@type": "BreadcrumbList", ... },
{ "@type": "FAQPage", ... },
{ "@type": "ImageObject", ... }
]
}
</script>@graph pattern benefits:
- Single script tag instead of multiple — cleaner HTML
- Entity linking via stable @id references (e.g., author references Person by @id)
- Google and AI systems parse @graph arrays correctly
- Easier to maintain and update as a single block
Output options:
- Embedded HTML — Ready to paste into or before
<head></body> - Standalone JSON — For CMS schema fields or API injection
- MDX component — If the project uses MDX, wrap in a component
Save the generated schema to the blog post file or to a separate schema file
as the user prefers.
将所有schema合并到单个标签中,采用@graph模式:
<script>html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "BlogPosting", ... },
{ "@type": "Person", ... },
{ "@type": "Organization", ... },
{ "@type": "BreadcrumbList", ... },
{ "@type": "FAQPage", ... },
{ "@type": "ImageObject", ... }
]
}
</script>@graph模式的优势:
- 单个script标签替代多个标签,HTML代码更简洁
- 通过稳定的@id引用实现实体关联(例如,author字段通过@id关联Person实体)
- Google和AI系统可正确解析@graph数组
- 更易于维护和更新,作为单个代码块即可
输出选项:
- 嵌入式HTML — 可直接粘贴到或
<head>标签前</body> - 独立JSON文件 — 适用于CMS的schema字段或API注入
- MDX组件 — 若项目使用MDX,可封装为组件
根据用户偏好,将生成的schema保存到博客文章文件或单独的schema文件中。