Templates overview
Ghost picks a root template based on the current route and, for pages and posts, the template selected in the editor.
How Ghost chooses a template
- Homepage: If you set a static “Home” page in Ghost (Settings → General → Homepage), Ghost uses
home.hbsfor that URL. Otherwise the index (blog) is the homepage. - Blog / archive: The route that lists posts (e.g.
/or/blog/) usesindex.hbs. The layout also includes the cover and optional featured-posts (controlled bydefault.hbsand theme settings). - Single post:
post.hbsby default. If the author selects a custom post template (e.g. “Case study”, “Full feature image”), Ghost uses the matchingcustom-*.hbsfile. - Single page:
page.hbsby default. When editing a page, you can choose a template (e.g. “About”, “Ghost application”); Ghost then usespage-<template-slug>.hbs(e.g.page-about.hbs,page-ghost-application.hbs). Template names and slugs are defined by the theme’s filename (withoutpage-and.hbs). - Author / tag:
author.hbsandtag.hbsfor author and tag archives.
All templates that extend the root layout start with {{!< default}} so default.hbs wraps the content.
Slug → template mapping (custom pages)
| Page slug (example) | Template selected in Admin | Theme file |
|---|---|---|
| (any) | Default | page.hbs |
about | About | page-about.hbs |
services | Services | page-services.hbs |
contact | Contact | page-contact.hbs |
ghost-application | Ghost application | page-ghost-application.hbs |
thanks | Thanks | page-thanks.hbs |
work | Work | page-work.hbs |
The slug is set on the page in Ghost; the template name is what you pick in the page’s template dropdown. Theme settings (@custom.*) control copy and toggles; see Theme settings.
Next
- Home — Homepage structure and theme settings
- Blog and index — Blog archive, cover, featured posts
- Post and page — Single post/page, content partial, custom post templates
- Ghost application page — Role-to-proof page and ghost_* settings
- Theme settings — Full reference of
@custom.*keys