Get access to a growing collection of Premium Ghost Themes with the Yearly Subscription 🔥33% Off

Ghost Snippets: Adding Schema markup in Ghost

Learn how to enhance your SEO with schema markup and structured data in Ghost CMS. Examples of recipe, product, breadcrumbs, FAQ, and event types.

Norbert
Norbert6 min read

Search engine optimization (SEO) plays a crucial role in achieving higher search rankings and driving organic traffic to websites. One effective strategy to optimize content and enhance search visibility is by utilizing schema markup and structured data.

In this article, we will explore how schema markup and structured data can be added within the Ghost CMS to improve SEO performance.

Schema Markup and Structured Data in Ghost

Schema markup is a code used to provide search engines with additional context regarding the content on web pages. It helps search engines understand the meaning and relationship between different elements of the content.

Structured data, on the other hand, refers to a standardized format used to organize and present data in a structured manner. Structured data is typically implemented using schema markup.

Implementing schema markup and structured data offers several benefits to website owners and content creators. Firstly, it assists search engines in better understanding and interpreting web content, leading to improved visibility and enhanced search rankings. Additionally, structured data allows for rich snippets to be displayed in search engine results pages (SERPs), increasing the likelihood of attracting user attention and click-through rates.

In Ghost you have several options to add schema markup and structured data:

  1. Add the markup code in your Post Code injection
  2. Add the markup code in an HTML card in the Ghost editor
  3. Add the markup code in your theme code

The above methods can be used for generating structured data markup for different types of content, such as, recipes, events, products, breadcrumbs and more.

When doing it via HTML cards, you can create content snippets and include the same structured data in your posts, just changing the values.

Now let's take a look at some of these schema markup types.

Recipe schema

Schema markup for recipes enables search engines to better understand and display information related to cooking instructions, ingredients, ratings, and more. Here's an example of a recipe schema markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Recipe",
  "name": "Classic Chocolate Chip Cookies",
  "image": "https://example.com/images/cookies.jpg",
  "author": {
    "@type": "Person",
    "name": "John Doe"
  },
  "recipeIngredient": [
    "1 cup butter",
    "1 cup granulated sugar",
    "1 cup brown sugar",
    "2 eggs",
    "2 teaspoons vanilla extract",
    "3 cups all-purpose flour",
    "1 teaspoon baking soda",
    "1 teaspoon salt",
    "2 cups chocolate chips"
  ],
  "recipeInstructions": [
    "Preheat oven to 375°F (190°C) and line baking sheets with parchment paper.",
    "In a large mixing bowl, cream together butter, granulated sugar, and brown sugar.",
    "Add eggs one at a time and stir in vanilla extract.",
    "In a separate bowl, whisk together flour, baking soda, and salt.",
    "Gradually add dry ingredients to the butter mixture.",
    "Stir in chocolate chips.",
    "Drop rounded tablespoons of dough onto prepared baking sheets.",
    "Bake for 8-10 minutes or until golden brown.",
    "Allow cookies to cool for a few minutes before transferring to a wire rack to cool completely."
  ],
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.8",
    "bestRating": "5",
    "ratingCount": "367"
  }
}
</script>

Product schema

Schema markup for products provides detailed information about a specific product, including its name, image, price, availability, and reviews. Here's an example of a product schema markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Wireless Noise-Canceling Headphones",
  "image": "https://example.com/images/headphones.jpg",
  "description": "Premium wireless headphones with exceptional noise-canceling technology.",
  "brand": {
    "@type": "Brand",
    "name": "Acme Headphones"
  },
  "sku": "AH123456",
  "offers": {
    "@type": "Offer",
    "priceCurrency": "USD",
    "price": "199.99",
    "availability": "https://schema.org/InStock",
    "seller": {
      "@type": "Organization",
      "name": "Acme Electronics"
    }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.6",
    "bestRating": "5",
    "ratingCount": "128"
  }
}
</script>

Schema markup for breadcrumbs helps search engines understand the structure and hierarchy of web pages within your website. This can improve site navigation and allow search engines to display breadcrumbs in search results. Here's an example of a breadcrumb schema markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://example.com"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Recipes",
      "item": "https://example.com/recipes"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Desserts",
      "item": "https://example.com/recipes/desserts"
    }
  ]
}
</script>

FAQ schema

Schema markup for frequently asked questions (FAQ) helps search engines display question-and-answer content directly in search results. This can increase visibility and provide quick answers to user queries. Here's an example of an FAQ schema markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "How long should I bake a cake?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The baking time for a cake depends on the recipe. It is usually mentioned in the recipe instructions. However, as a general guideline, most cakes bake between 25 to 45 minutes."
      }
    },
    {
      "@type": "Question",
      "name": "Can I substitute baking powder for baking soda?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Baking powder and baking soda are not direct substitutes. However, you can use 1 teaspoon of baking powder for 1/4 teaspoon of baking soda, provided there is enough acid in the recipe to activate the baking powder."
      }
    }
  ]
}
</script>

Event schema

Schema markup for events provides structured data related to upcoming events, including the event's name, date, location, and ticket information. This helps search engines display event details prominently, increasing the chances of attracting interested attendees. Here's an example of an event schema markup:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "Annual Charity Run",
  "startDate": "2022-07-15T09:00",
  "endDate": "2022-07-15T12:00",
  "location": {
    "@type": "Place",
    "name": "Central Park",
    "address": "123 Main St, New York, NY 10001"
  },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/charity-run",
    "price": "25",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "validFrom": "2022-06-01T00:00"
  },
  "performer": {
    "@type": "PerformingGroup",
    "name": "Local Musicians"
  }
}
</script>

Schema markup testing and validation

By testing your schema markup, you can verify that search engines can interpret your structured data correctly, enhancing your chances of obtaining rich search results and improved visibility.

The official Schema.org website offers a Schema Markup Validator allowing you to check the correctness of your schema markup code. Simply input your code or URL, and the validator will analyze your structured data for any errors or inconsistencies.

The Rich Results Test is another tool by Google, specifically designed to test and preview how your structured data might appear in search engine results. It provides a visual representation of your content's appearance and highlights any issues or missing elements related to rich results.


Schema markup and structured data types such as Recipe, Product, Breadcrumbs, FAQ, and Event offer website owners a valuable opportunity to enhance SEO performance and improve search visibility. By implementing these structured data types within your content, you can provide search engines with rich information, leading to higher search rankings, increased user engagement, and improved click-through rates.

More in Snippets

All snippets

Ghost Snippets: Custom Stylish Tables

How to add create custom stylish tables in your Ghost theme. You can use these tables when you want to compare data or highlight information in a tabular fashion.

Ghost Snippets: Accordions

How to add create custom stylish accordions in your Ghost theme. Add collapsible customizable pieces of content using our complete tutorial including HTML markup and CSS for styling.

Ghost Snippets: Custom Alert Boxes

How to add alert boxes to your Ghost Theme. How to highlight critical information using alert boxes in your Ghost theme. Guide to add the HTML markup and style it with CSS.

Ghost Pro Hosting

Get the best managed Ghost CMS hosting and focus on bringing value to your audience.