Hi..
I’m using a custom ghost cms theme for my site. I notice that ghost cms does not have default schema implementation features.
So how do you manage schema?
Thanks
Hamza
That’s the Rich Results Test on your homepage, and that result is normal. The tool only shows schema types that qualify for a rich result. Ghost puts a WebSite object on the homepage, which isn’t one of them, so you get “No items detected” even though the markup is there.
I ran your latest post through validator.schema.org and it comes back clean: a full Article object with headline, dates, keywords, publisher with logo, author and image, zero errors and zero warnings. Screenshot attached. Your theme has ghost_head in place and Ghost is doing exactly what it should.
Test an article URL in the Rich Results Test and it will pick up the Article. What Ghost doesn’t do is breadcrumbs, FAQ or product schema. For those I add a small JSON-LD block in the theme or a code injection snippet per post. Is there a specific rich result you were hoping to get?
Sure. Ghost has no breadcrumb helper, so you build the list yourself with the handlebars data that’s already in the post context. Open post.hbs in your theme and drop this inside the {{#post}} block, anywhere works, I usually put it right after the opening tag:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "{{@site.url}}/"
}{{#primary_tag}},
{
"@type": "ListItem",
"position": 2,
"name": "{{name}}",
"item": "{{url absolute="true"}}"
}{{/primary_tag}},
{
"@type": "ListItem",
"position": {{#if primary_tag}}3{{else}}2{{/if}},
"name": "{{title}}",
"item": "{{url absolute="true"}}"
}
]
}
</script>
That gives you Home > primary tag > post, which matches how your site is organised. If a post has no tag the middle item is skipped and the numbering adjusts. Upload the theme, run an article through the validator again and you should see Article plus BreadcrumbList with zero errors.
Two things to know. Handlebars escapes quotes and ampersands in titles to HTML entities, so a title with an ampersand shows up as & in the raw JSON. Google reads that fine but don’t be surprised if you see it in the validator. And Google prefers the markup to match a breadcrumb the reader can actually see, so if you want the rich result in search you should also render a small visible breadcrumb in the same template. Do you have one on the page already, or is that something you’d want to add too?
Thanks again for the schema code.
no, my website does not have visible breadcrumb, I will like to add this if you guide me.
Easy enough. Put this in post.hbs, inside the {{#post}} block, right above the article title:
<nav class="breadcrumb" aria-label="Breadcrumb">
<a href="{{@site.url}}/">Home</a>
{{#primary_tag}}
<span aria-hidden="true">/</span>
<a href="{{url}}">{{name}}</a>
{{/primary_tag}}
<span aria-hidden="true">/</span>
<span aria-current="page">{{title}}</span>
</nav>
And add this to your screen.css:
.breadcrumb {
font-size: 0.85rem;
color: #6b6b6b;
margin-bottom: 1.5rem;
}
.breadcrumb a {
color: inherit;
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--accent);
}
.breadcrumb span[aria-hidden] {
margin: 0 0.4em;
}
That gives you Home / Buying Solar / Post title, same structure as the JSON-LD so Google sees the two agree. The current page is plain text on purpose, you don’t link to where you already are. Colours are a starting point, adjust to your theme.
Zip the theme, upload it in Settings, then check an article in the Rich Results Test. You should get Article and Breadcrumbs both listed. Let me know if the position looks off, it depends a bit on how your post header is built.
Thanks ![]()
I hope this will also help others who are facing the same issues.