# Schema markup for Ghost

Post code injection or an HTML card · Works with any Ghost theme · No JavaScript

Source: https://brightthemes.com/snippets/schema-markup

Structured data (JSON-LD) for the posts Ghost doesn't describe on its own, such as an event, a product review or a recipe, so search engines can show them as rich results.

## When to use it
- A post announcing a workshop, meetup or webinar, so it can appear in event results with its date and ticket link.
- A review of a single product, with your own rating and its pros and cons, for review snippets in search.
- Recipe posts on a food site, so they can appear in recipe results with the photo and cooking time.
When not to: For an ordinary article, add nothing: Ghost already marks every post up as an `Article`.

## The code

Event:

```html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Newsletter growth workshop",
  "description": "A one-hour live session on growing a Ghost newsletter, with questions at the end.",
  "startDate": "2026-12-04T17:00:00+00:00",
  "endDate": "2026-12-04T18:00:00+00:00",
  "eventStatus": "https://schema.org/EventScheduled",
  "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
  "location": {
    "@type": "VirtualLocation",
    "url": "https://example.com/workshop/"
  },
  "image": [
    "https://example.com/content/images/2026/11/workshop.jpg"
  ],
  "organizer": {
    "@type": "Organization",
    "name": "Example Publication",
    "url": "https://example.com/"
  },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/workshop/",
    "price": "0",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "validFrom": "2026-11-12T09:00:00+00:00"
  }
}
</script>
```

Product review:

```html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Acme Mechanical Keyboard",
  "image": [
    "https://example.com/content/images/2026/11/keyboard.jpg"
  ],
  "brand": {
    "@type": "Brand",
    "name": "Acme"
  },
  "review": {
    "@type": "Review",
    "reviewRating": {
      "@type": "Rating",
      "ratingValue": "4",
      "bestRating": "5"
    },
    "author": {
      "@type": "Person",
      "name": "Jane Doe"
    },
    "positiveNotes": {
      "@type": "ItemList",
      "itemListElement": [
        { "@type": "ListItem", "position": 1, "name": "Quiet, even keys" },
        { "@type": "ListItem", "position": 2, "name": "Battery lasts weeks" }
      ]
    },
    "negativeNotes": {
      "@type": "ItemList",
      "itemListElement": [
        { "@type": "ListItem", "position": 1, "name": "No backlight" }
      ]
    }
  }
}
</script>
```

Recipe:

```html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Recipe",
  "name": "Classic chocolate chip cookies",
  "description": "Crisp at the edges, soft in the middle, ready in 25 minutes.",
  "image": [
    "https://example.com/content/images/2026/11/cookies.jpg"
  ],
  "author": {
    "@type": "Person",
    "name": "Jane Doe"
  },
  "datePublished": "2026-11-03",
  "prepTime": "PT15M",
  "cookTime": "PT10M",
  "totalTime": "PT25M",
  "recipeYield": "24 cookies",
  "recipeCategory": "Dessert",
  "recipeIngredient": [
    "1 cup butter, softened",
    "2 cups brown sugar",
    "2 eggs",
    "3 cups all-purpose flour",
    "1 teaspoon baking soda",
    "2 cups chocolate chips"
  ],
  "recipeInstructions": [
    { "@type": "HowToStep", "text": "Heat the oven to 375°F (190°C) and line two baking sheets." },
    { "@type": "HowToStep", "text": "Cream the butter and sugar, then beat in the eggs." },
    { "@type": "HowToStep", "text": "Stir in the flour, baking soda and chocolate chips." },
    { "@type": "HowToStep", "text": "Bake spoonfuls for 8 to 10 minutes, until golden." }
  ]
}
</script>
```

## Add it to your site

1. Open the post it describes and paste the code in **Post settings › Code injection › Post header**. Or add an **HTML card** (type `/html`) anywhere in the post and paste it there.
2. Replace the example values with your own, keeping them the same as what the post says. Update the post.

## How it works

Structured data describes what a page is about in a form search engines read directly: this post is an event on 4 December, or a review that gives this keyboard 4 out of 5, or a recipe that takes 25 minutes. Search engines can then show it as a rich result, with the date, the rating or the cooking time. The code is JSON-LD, a block of data in a script tag, so it shows nothing on the page.

The three tabs are worked examples of the types most Ghost publishers need. Copy the one closest to your post, replace every value with your own, and delete the fields you don't need. Each type has its own required fields; Google's [structured data gallery](https://developers.google.com/search/docs/appearance/structured-data/search-gallery) lists them.

Every value has to match what the post itself says: the same date, the same rating, the same ingredients. If you publish many posts of one kind, put its block in an HTML card and save it as a Ghost snippet, then change the values in each post.

## What Ghost already does

Ghost adds structured data to every page itself: an `Article` for each post, plus the site, authors and tags. Don't add a second `Article`; add only types Ghost doesn't cover, such as `Recipe`, `Product` or `Event`. Breadcrumbs are best added in the theme, as described in [Ghost breadcrumbs](https://brightthemes.com/blog/ghost-breadcrumbs).

## Things to know

- **Ratings:** a review's `reviewRating` is your own score. Add `aggregateRating` only if readers really rate the item on your site; made-up ratings go against Google's guidelines.
- **Events:** keep the date and time with their time zone (`+00:00`), and set `eventStatus` to `EventCancelled` or `EventRescheduled` if plans change, rather than deleting the block.
- **FAQ and HowTo:** Google [stopped showing these rich results](https://developers.google.com/search/blog/2023/08/howto-faq-changes) in 2023 (FAQ results now show only for a few government and health sites), so they're no longer worth adding.
- **Check it:** test the code, or the published post's URL, with Google's [Rich Results Test](https://search.google.com/test/rich-results) or the [Schema Markup Validator](https://validator.schema.org/).

It works with every Ghost theme, including ours (https://brightthemes.com/themes). Something not right? Ask support: https://brightthemes.com/support
