Skip to main content

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.hbs for that URL. Otherwise the index (blog) is the homepage.
  • Blog / archive: The route that lists posts (e.g. / or /blog/) uses index.hbs. The layout also includes the cover and optional featured-posts (controlled by default.hbs and theme settings).
  • Single post: post.hbs by default. If the author selects a custom post template (e.g. “Case study”, “Full feature image”), Ghost uses the matching custom-*.hbs file.
  • Single page: page.hbs by default. When editing a page, you can choose a template (e.g. “About”, “Ghost application”); Ghost then uses page-<template-slug>.hbs (e.g. page-about.hbs, page-ghost-application.hbs). Template names and slugs are defined by the theme’s filename (without page- and .hbs).
  • Author / tag: author.hbs and tag.hbs for 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 AdminTheme file
(any)Defaultpage.hbs
aboutAboutpage-about.hbs
servicesServicespage-services.hbs
contactContactpage-contact.hbs
ghost-applicationGhost applicationpage-ghost-application.hbs
thanksThankspage-thanks.hbs
workWorkpage-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