The Ghost Themes Developer Hub

Welcome to the Ghost Themes developer hub. You'll find comprehensive guides and documentation to help you start working with Ghost Themes as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

log

{{log}} Helper - Debug your theme data

Usage: {{log value}}

Type
Parameters
Attributes
  • value (any)

n/a

Description

{{log}} is a helper which is part of Handlebars, but until Ghost 0.4.2 this hasn't done anything useful.

When running Ghost in development mode, you can now use the {{log}} helper to output debug messages to the server console. In particular you can get handlebars to output the details of objects or the current context

For example, to output the full 'context' that handlebars currently has access to:

{{log this}}

Or to just log each post in the loop:

{{#foreach posts}}
   {{log post}}
{{/foreach}}

log

{{log}} Helper - Debug your theme data