Skip to main content
seofields
docs

BlogPosting

The BlogPosting schema type is a more specific subtype of Article designed specifically for blog posts. It enables search engines to display rich results with author attribution, publish date, and canonical page association.

About BlogPosting

BlogPosting inherits all properties from Article but signals to search engines that the content is specifically a blog post. This distinction helps search engines categorize content correctly and can improve visibility in blog-specific search features. The mainEntityOfPage property is especially important — it tells search engines which URL is the canonical home for this content, preventing duplicate content issues and consolidating ranking signals. Use BlogPosting for blog content and the more general Article type for news and editorial content.

Fields

FieldTypeRequiredDescription
headlinestringThe headline or title of the blog post. Should be concise and under 110 characters.
descriptionstringA short summary or excerpt of the blog post content.
author.namestringThe name of the blog post's author.
datePublisheddateThe date the blog post was originally published (ISO 8601 format).
mainEntityOfPage.idstringThe canonical URL (@id) of the page where this blog post is the main content.

Plugin Registration

sanity.config.ts
import { defineConfig } from 'sanity'
import { schemaOrgBlogPostingPlugin } from 'sanity-plugin-seofields/schema'

export default defineConfig({
  // ... your sanity config
  plugins: [
    schemaOrgBlogPostingPlugin(),
  ],
})

Schema Usage

Add theschemaOrgBlogPosting field to any document schema:

schemas/page.ts
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrgBlogPosting',
      title: 'Blog Posting Schema',
      type: 'schemaOrgBlogPosting',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "yourDocument"][0]{
  schemaOrgBlogPosting {
    headline,
    description,
    author {
      name
    },
    datePublished,
    mainEntityOfPage {
      id
    }
  }
}

Next.js Component

app/layout.tsx
import { BlogPostingSchema } from 'sanity-plugin-seofields/schema/next'

export default function Layout({ data }) {
  return <BlogPostingSchema data={data.schemaOrgBlogPosting} />
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Getting Started with Schema.org Markup",
  "description": "Learn how to add structured data to your blog posts for better search engine visibility.",
  "author": {
    "@type": "Person",
    "name": "Jane Doe"
  },
  "datePublished": "2025-01-15",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.com/blog/schema-org-guide"
  }
}

Was this page helpful?