
jekyll-structured-content
A Jekyll plugin that generates JSON-LD structured data for posts, pages, projects, and FAQs without touching your theme markup.
jekyll-structured-content is a Jekyll plugin that writes clean, standards-compliant JSON-LD structured data from the frontmatter you already have. You don’t have to change your theme. It handles the BlogPosting, WebPage, ProfilePage, CreativeWork, and FAQPage schema types.
Why This Exists
Structured data tells search engines and AI systems what your content is, who wrote it, and what questions it answers. Most full SEO plugins bring a lot of extra stuff along, like meta tag management, Open Graph, and sitemaps. I wanted a plugin that does one thing. It writes valid JSON-LD from your Jekyll frontmatter and leaves everything else alone.
Source Code
- GitHub: github.com/jchance/jekyll-structured-content
- RubyGems: rubygems.org/gems/jekyll-structured-content
Installation
Add to your Gemfile:
gem "jekyll-structured-content", "~> 0.2.0"
Add to _config.yml:
plugins:
- jekyll-structured-content
Then run bundle install.
Usage
Put the tag inside a <script> block in your layout:
<script type="application/ld+json">{% schema_json_ld post %}</script>
Supported types: post, page, project.
For FAQ schema, add an faq array to your frontmatter and output it with its own tag:
<script type="application/ld+json">{% faq_json_ld %}</script>
faq:
- question: "What does this plugin do?"
answer: "It emits JSON-LD structured data from Jekyll frontmatter."
What It Emits
| Tag | Schema type |
|---|---|
{% schema_json_ld post %} |
BlogPosting |
{% schema_json_ld page %} |
WebPage (or ProfilePage for /about/) |
{% schema_json_ld project %} |
CreativeWork |
{% faq_json_ld %} |
FAQPage |
Live Example
I use the plugin on every post and project page on this site. Here’s one with both BlogPosting and FAQPage schema:
