How to Overwrite Article Schema with Recipe Schema Markup

  • What’s your URL? This is the easiest way for others to debug your issue: Blog Not Started yet!! Only Tried in Localhost
  • What version of Ghost are you using? : Ghost-CLI version: 1.11.0 Ghost version: 2.27.0

**Problem**

By Default, Ghost generates Article Schema Markup.

But what if I’m running Recipe blog and I need Recipe Schema (Check Here)

Yes, It’s Possible to Generate Recipe schema and Inject to Header of the Post with the Help of Code Injection. But the thing is. Google Bot get confused because Ghost also generates Schema which is for Article.

How to fix this issue. or Possible to disable Ghost Schema Markup.

2 Likes

Hey there! Most of the page meta and schema are wrapped up in the {{ ghost_head }} template variable, you could create a custom template for Recipes and replace this variable with your own code. Bear in mind though that you’ll have to write out all the meta information yourself. Here’s the variable inside our theme Casper:

Alright, Is it possible to Disable Ghost Auto Schema generation? Seems, Recipe Schema differs for each and every recipe. Like time, calories and all.

So, If I remove {{ghost_head}} It’ll remove everything includes, Social Tags Right?

Sounds like you’re wanting something a lot more bespoke, so yes it would be wise to remove the {{ ghost_head }} code and put your own in. Yes it will remove the social tags as well, but from what you’re saying this could be a good thing because you’ll be able to construct your own social tags

Aahh Man!! I don’t wanna try this time. By Removing {{ ghost_head }} from the default.hbs will remove everything. Include Default Meta tags. :confused:

Hope you guys will do something. Soon :blush: @John

I don’t wanna use WordPress again.

1 Like

There are some default meta tags that aren’t included in the ghost_head tag, as you can see from the sample code higher up in the thread. Personally I’d prefer to have full custom control if I’m making specific changes like you’re wanting to do :slightly_smiling_face:

1 Like

I know this is an old thread, but in case anyone else lands here: I’ve tested and I don’t see evidence that Google is “confused” if recipe schema is injected into the header.

I documented how add recipe schema to Ghost here:

And here’s a recipe that uses it, if you want to paste the URL into Google’s testing service and check the results for yourself:

1 Like

Thanks for sharing @markstos :heart: