---
title: "Schema.org for a Blog · Unhead"
canonical_url: "https://unhead.unjs.io/docs/solid-js/schema-org/guides/recipes/blog"
last_updated: "2026-08-08T01:22:01.202Z"
meta:
  description: "Add Article or BlogPosting structured data with defineArticle() so search engines can understand a post and its author, dates, and images."
  "og:description": "Add Article or BlogPosting structured data with defineArticle() so search engines can understand a post and its author, dates, and images."
  "og:title": "Schema.org for a Blog · Unhead"
---

Home

`
Unhead on GitHub

Switch to Solid.jsSwitch to TypeScriptSwitch to VueSwitch to ReactSwitch to SvelteSwitch to AngularSwitch to Nuxt

**Recipes**

# **Schema.org for a Blog**

[Copy for LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/blog.md)

Use `**defineArticle()**` with `**@type: 'BlogPosting'**` to mark up blog posts. [**~~Article structured data can help Google understand the author, publication date, and representative images~~**](https://developers.google.com/search/docs/appearance/structured-data/article).

Article markup can affect how Google understands title text, images, and date information, but it does not guarantee a particular search appearance.

## Useful Links

- [**~~Article - Schema.org~~**](https://schema.org/Article)
- [**~~Article | Google Search Central~~**](https://developers.google.com/search/docs/appearance/structured-data/article)

## How do I mark up a blog article?

The [**~~defineArticle~~**](https://unhead.unjs.io/docs/schema-org/api/schema/article) helper creates an Article node and handles its supported relationships.

Some fields may already be inferred. See [**~~Schema.org Params~~**](https://unhead.unjs.io/docs/schema-org/guides/core-concepts/params).

```
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineArticle({
    // name and description can usually be inferred
    image: '/photos/16x9/photo.jpg',
    datePublished: new Date('2020-02-01T00:00:00.000Z'),
    dateModified: new Date('2020-02-01T00:00:00.000Z'),
  })
])
```

## How do I specify the article type?

Set `**@type**` to describe the kind of article. The most common choices are `**BlogPosting**` and `**NewsArticle**`.

```
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineArticle({
    '@type': 'BlogPosting',
    // ...
  })
])
```

See the [**~~Article Types~~**](https://unhead.unjs.io/docs/schema-org/api/schema/article#sub-types) for the list of available types.

## How do I add an author?

Set `**author**` when an article's author differs from the [**~~site identity~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity).

When a Person and an Article are registered together, the Person becomes the Article's author if the Article does not already have one.

```
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineArticle({
    headline: 'My Article',
    author: [
      {
        name: 'John Doe',
        url: 'https://johndoe.com',
      },
      {
        name: 'Jane Doe',
        url: 'https://janedoe.com',
      },
    ]
  })
])
```

## How do I mark up blog archive pages?

If a parent layout already defines `**WebPage**` and `**WebSite**`, set the page type to `**CollectionPage**` for a blog archive.

See [**~~CollectionPage~~**](https://schema.org/CollectionPage) for more information.

```
import { defineWebPage, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineWebPage({
    '@type': 'CollectionPage'
  }),
])
```

## Expected JSON-LD Output

Combining the fields shown above, with a host of `**https://example.com**` and a page path of `**/blog/my-post**`, produces JSON-LD like this:

```
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": ["Article", "BlogPosting"],
      "@id": "https://example.com/blog/my-post#article",
      "headline": "My Article",
      "image": { "@id": "https://example.com/#/schema/image/1" },
      "datePublished": "2020-02-01T00:00:00.000Z",
      "dateModified": "2020-02-01T00:00:00.000Z",
      "author": [
        { "@id": "https://example.com/#/schema/person/1" },
        { "@id": "https://example.com/#/schema/person/2" }
      ],
      "thumbnailUrl": "https://example.com/photos/16x9/photo.jpg"
    },
    {
      "@type": "Person",
      "@id": "https://example.com/#/schema/person/2",
      "name": "Jane Doe",
      "url": "https://janedoe.com"
    },
    {
      "@type": "Person",
      "@id": "https://example.com/#/schema/person/1",
      "name": "John Doe",
      "url": "https://johndoe.com"
    },
    {
      "@type": "ImageObject",
      "@id": "https://example.com/#/schema/image/1",
      "contentUrl": "https://example.com/photos/16x9/photo.jpg",
      "url": "https://example.com/photos/16x9/photo.jpg"
    }
  ]
}
```

## Common Issues

### Missing `**image**` warning

Google recommends one or more representative images for Article markup. Provide `**image**` when the page has a suitable image.

### `**datePublished**` format errors

Pass a JavaScript `**Date**` object and Unhead will serialize it as ISO 8601.

### Author not showing

To use the site identity as the author, call `**defineOrganization()**` or `**definePerson()**` in the layout.

## Related Recipes

- [**~~Setting Up Your Identity~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity): Define your organization/person
- [**~~Breadcrumbs~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/breadcrumbs): Add navigation breadcrumbs
- [**~~FAQ Page~~**](https://unhead.unjs.io/docs/schema-org/guides/recipes/faq): Add FAQ structured data

[~~Edit this page~~](https://github.com/unjs/unhead/edit/main/docs/schema-org/2.guides/4.recipes/blog.md)

[~~Markdown For LLMs~~](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/blog.md)

**Did this page help you? **

[**Identity** Set up Organization, Person, or LocalBusiness as your site identity and connect it to articles, products, pages, and your website.](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity) [**Breadcrumbs** Add BreadcrumbList structured data with defineBreadcrumb() so Google can use a page hierarchy in search results.](https://unhead.unjs.io/docs/schema-org/guides/recipes/breadcrumbs)

**On this page **

- [Useful Links](#useful-links)
- [How do I mark up a blog article?](#how-do-i-mark-up-a-blog-article)
- [How do I specify the article type?](#how-do-i-specify-the-article-type)
- [How do I add an author?](#how-do-i-add-an-author)
- [How do I mark up blog archive pages?](#how-do-i-mark-up-blog-archive-pages)
- [Expected JSON-LD Output](#expected-json-ld-output)
- [Common Issues](#common-issues)
- [Related Recipes](#related-recipes)