In short. The ghost_head helper belongs before the closing head tag in default.hbs and outputs Ghost metadata and injected head code.
Definition:
{{ghost_head}}is a Ghost theme helper that inserts system metadata and injected code into a page's HTML head. As of 17 October 2026, Ghost documents it as a required helper, placed just before</head>indefault.hbs.
Key facts
- Ghost's helper documentation lists a meta description, structured data (machine-readable page information) in Schema.org JSON-LD format, and Facebook Open Graph and Twitter Card tags among its outputs.
- Ghost's theme structure reference identifies
default.hbsas the shared base template containing the requiredghost_headandghost_foothelpers. - Ghost's SEO documentation says each post or page has its own metadata, with automatic fallbacks when custom metadata is blank.
- Ghost's code injection guide places Site Header code inside the HTML head and Site Footer code before the closing body tag.
Where does the helper belong?
The helper reference specifies this placement:
{{ghost_head}}
</head>
In Ghost's template hierarchy, default.hbs holds shared HTML elements such as <html>, <head> and <body>. Other templates extend that base layout to avoid repeating the same HTML. The standard single-post template, post.hbs, extends default.hbs.
Keeping the helper in the base layout makes it part of the shared page structure. When reviewing a custom layout, checking which template it extends helps locate the relevant head markup.
What determines the metadata values?
Ghost's SEO guide describes automatic structured data for posts and pages, alongside custom metadata settings. Homepage metadata is editable under Settings → General → Meta data. Post and page metadata is editable from the post settings menu; blank fields use available page content as a fallback.
Ghost's post settings guide provides separate controls for custom search metadata and social cards. The X card settings accept custom data and fall back to custom metadata when unset. Facebook card settings accept Open Graph data for sharing a post. These settings supply publication content, while the theme helper provides the documented output point in the head.
How can a theme implementation be checked?
Review the base layout for the helper call and inspect a published page's HTML head for the outputs listed in the helper documentation, including the meta description and social sharing tags.
For custom additions, Ghost's code injection guide gives the admin path Settings → Advanced → Code Injection. Site-wide additions apply across the site; individual posts and pages have code injection in Post Settings. Checking the relevant scope helps trace an extra script, style or meta tag.
Ghost's structure reference names GScan as the tool for a full validation report during development.
Related terms
- Where do I edit a Ghost post's search metadata?
- What structured data does Ghost generate automatically?
- Does Ghost require an SEO plugin for basic metadata?
FAQ
Can I add custom code without editing the theme?
Yes. Ghost's code injection guide lets you add styles, meta tags and scripts through the admin interface, either site-wide or for an individual post or page.
Does every template file need its own helper call?
Ghost's structure reference describes default.hbs as the base layout. You can check whether your post or page template inherits that layout before deciding where the shared helper call belongs.
Sources
- Ghost, "ghost_head & ghost_foot", undated
- Ghost, "Structure", undated
- Ghost, "SEO in Ghost", undated
- Ghost, "Preparing posts for publishing", undated
- Ghost, "Adding styles with code injection", undated
Check how a page reads to answer engines. Open the GEO score analyzer