{"category":{"version":"58810495d172b61b00d73859","project":"542fe92a5eceb608003fddc8","_id":"58810495d172b61b00d7385d","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-04T12:45:40.548Z","from_sync":false,"order":3,"slug":"helper-reference","title":"Helper Reference"},"parentDoc":null,"project":"542fe92a5eceb608003fddc8","user":"542c5cfcddd3190e00228849","version":{"__v":1,"_id":"58810495d172b61b00d73859","project":"542fe92a5eceb608003fddc8","createdAt":"2017-01-19T18:25:25.206Z","releaseDate":"2017-01-19T18:25:25.206Z","categories":["58810495d172b61b00d7385a","58810495d172b61b00d7385b","58810495d172b61b00d7385c","58810495d172b61b00d7385d","58810495d172b61b00d7385e","58810495d172b61b00d7385f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.11.4","version":"0.11.4"},"_id":"58810495d172b61b00d73883","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-04T19:36:02.777Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":39,"body":"Usage: `{{log value}}`\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Type\",\n    \"h-1\": \"Parameters\",\n    \"h-2\": \"Attributes\",\n    \"0-0\": \"[Output](/docs/helpers#section-output), [Debugging](/docs/helpers#section-debugging), [Handlebars](/docs/helpers#section-handlebars)\",\n    \"0-1\": \"* value (any)\",\n    \"0-2\": \"n/a\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n### Description\n\n`{{log}}` is a helper which is part of Handlebars, but until Ghost 0.4.2 this hasn't done anything useful.\n\nWhen 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\n\nFor example, to output  the full 'context' that handlebars currently has access to:\n\n`{{log this}}`\n\nOr to just log each post in the loop:\n\n```\n{{#foreach posts}}\n   {{log post}}\n{{/foreach}}\n```","excerpt":"`{{log}}` Helper - Debug your theme data","slug":"log","type":"basic","title":"log"}

log

`{{log}}` Helper - Debug your theme data

Usage: `{{log value}}` [block:parameters] { "data": { "h-0": "Type", "h-1": "Parameters", "h-2": "Attributes", "0-0": "[Output](/docs/helpers#section-output), [Debugging](/docs/helpers#section-debugging), [Handlebars](/docs/helpers#section-handlebars)", "0-1": "* value (any)", "0-2": "n/a" }, "cols": 3, "rows": 1 } [/block] ### 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}} ```