How to Add Schema Markup to Your Jekyll Site
Add JSON-LD structured data to your Jekyll site — Article, BreadcrumbList, FAQPage, and WebSite schemas — to improve search appearance and rich snippets.
Schema markup tells search engines what your content is about — not just the words, but the type of content. It can earn your site rich snippets in Google’s results: star ratings, FAQ dropdowns, breadcrumbs, and sitelinks. This guide covers the schemas most relevant to Jekyll sites.
What Is Schema Markup?
Schema markup (structured data) is machine-readable metadata you add to your HTML. Google reads it to better understand your content and may display enhanced results (“rich snippets”) for it.
For Jekyll sites, the most useful schemas are:
- Article — for blog posts
- WebSite — sitewide search box in Google results
- BreadcrumbList — breadcrumb navigation in results
- FAQPage — accordion FAQ in results
- Person/Organization — about/author pages
The Right Format: JSON-LD
There are three formats for structured data: Microdata, RDFa, and JSON-LD. Always use JSON-LD — Google recommends it and it’s the easiest to add without touching your content markup.
Article Schema for Blog Posts
Add this to your _layouts/post.html inside <head> or before </body>:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": {{ page.title | jsonify }},
"description": {{ page.description | default: page.excerpt | strip_html | truncatewords: 30 | jsonify }},
"datePublished": "{{ page.date | date_to_xmlschema }}",
"dateModified": "{{ page.last_modified_at | default: page.date | date_to_xmlschema }}",
"author": {
"@type": "Person",
"name": {{ page.author | default: site.author | jsonify }},
"url": {{ site.url | jsonify }}
},
"publisher": {
"@type": "Organization",
"name": {{ site.title | jsonify }},
"logo": {
"@type": "ImageObject",
"url": "{{ site.url }}/assets/images/logo.png"
}
},
{% if page.image %}
"image": {
"@type": "ImageObject",
"url": "{{ site.url }}{{ page.image }}"
},
{% endif %}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ page.url | absolute_url }}"
}
}
</script>
WebSite Schema with Sitelinks Search Box
Add this to your _layouts/default.html to enable the sitelinks search box in Google results:
{% if page.url == '/' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": {{ site.title | jsonify }},
"url": {{ site.url | jsonify }},
"description": {{ site.description | jsonify }},
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "{{ site.url }}/search/?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
}
</script>
{% endif %}
BreadcrumbList Schema
Breadcrumbs in Google results look like: JekyllHub > Tutorials > How to Install a Jekyll Theme
For posts:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": {{ site.url | jsonify }}
},
{
"@type": "ListItem",
"position": 2,
"name": {{ page.category | jsonify }},
"item": "{{ site.url }}/category/{{ page.category | downcase | replace: ' ', '-' }}/"
},
{
"@type": "ListItem",
"position": 3,
"name": {{ page.title | jsonify }},
"item": {{ page.url | absolute_url | jsonify }}
}
]
}
</script>
FAQPage Schema
If you have a page with questions and answers (like a FAQ page), this schema can earn accordion dropdowns in Google results — prime real estate.
{% if page.layout == 'faq' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{% for faq in page.faqs %}
{
"@type": "Question",
"name": {{ faq.question | jsonify }},
"acceptedAnswer": {
"@type": "Answer",
"text": {{ faq.answer | jsonify }}
}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
</script>
{% endif %}
In your FAQ page front matter:
---
layout: faq
title: Frequently Asked Questions
faqs:
- question: "How do I install a Jekyll theme?"
answer: "Download the theme files, add them to your Jekyll project, update your Gemfile if it's a gem-based theme, and run bundle install."
- question: "Are Jekyll themes free?"
answer: "Many Jekyll themes are free and open-source. Premium themes are also available with additional features and support."
---
Person Schema for Author Pages
{% if page.layout == 'author' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": {{ page.name | jsonify }},
"description": {{ page.bio | jsonify }},
"url": {{ page.url | absolute_url | jsonify }},
{% if page.avatar %}
"image": "{{ site.url }}{{ page.avatar }}",
{% endif %}
{% if page.twitter %}
"sameAs": [
"https://twitter.com/{{ page.twitter }}"
],
{% endif %}
"knowsAbout": ["Jekyll", "Static Sites", "Web Development"]
}
</script>
{% endif %}
Software Schema for Theme Pages
For a theme marketplace like JekyllHub, the SoftwareApplication schema is relevant:
{% if page.layout == 'theme' %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": {{ page.title | jsonify }},
"description": {{ page.description | jsonify }},
"applicationCategory": "WebApplication",
"operatingSystem": "Any",
"offers": {
"@type": "Offer",
"price": "{{ page.price | default: '0' }}",
"priceCurrency": "USD"
},
{% if page.stars %}
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": {{ page.stars | jsonify }}
},
{% endif %}
"url": {{ page.url | absolute_url | jsonify }}
}
</script>
{% endif %}
Testing Your Structured Data
- Google Rich Results Test — search.google.com/test/rich-results — tests a URL or code snippet and shows which rich results are eligible
- Schema Markup Validator — validator.schema.org — validates syntax
- Google Search Console → Enhancements — shows any structured data errors across your whole site
Common Mistakes
Invalid dates — Use date_to_xmlschema in Liquid to generate the correct ISO 8601 format: 2026-06-25T00:00:00+00:00.
Mismatched content — Schema values must match the visible page content. Don’t claim a rating if you don’t show ratings on the page — Google will ignore it.
Missing required fields — Every schema type has required fields. Use the Rich Results Test to catch them.
Too much schema — Only add schema for content that genuinely matches the type. Don’t add FAQPage schema to a regular post.
With well-implemented schema markup, your Jekyll site’s search results can include breadcrumbs, FAQs, and article bylines — making your listings more clickable than plain blue links.
Looking for a Jekyll theme that makes SEO easy? Browse JekyllHub for themes with jekyll-seo-tag built in.