@page.show_title_and_feature_image
- true (default) or false value from Ghost Editor
@page.show_title_and_feature_image
is always present and defaults to true
, supporting this feature in your theme won’t break anything for anyone using the old editor.
Using the @page
object is not backward-compatible with earlier versions of Ghost: once implemented the theme will only be compatible with Ghost 5.54.1 or later.
Example code
Styling tips when hiding the title and feature image
- Whenever the page title and feature image are hidden, and the page content starts with a full-width card (such cards will have the class
.kg-width-full
), remove spacing between the top navigation and content (on pages only). - Whenever multiple full-width cards are stacked, remove spacing between them (on posts and pages).
- Whenever content ends with a full-width card, remove spacing between the content and the footer (on pages only, posts often have additional content at the bottom such as comments, CTAs, related posts, etc.).
.kg-card-hascaption
, and maintaining spacing is desirable in this case.
The implementation of these changes will look different on every theme. Find examples of these recommended changes in Casper here (1 and 3) and here (2).