Reputation: 1
I'd like to utilize handlebars within the Ghost's post editor similarly to how I use them in my custom Ghost template.
For example:
"Thank you for visiting {{@blog.title}}!
Please feel free to contact us via the [Contact page](http://{{@blog.url}}/contact)."
Is this possible, and if so, how do I accomplish this?
Upvotes: 0
Views: 452
Reputation: 540
This isn't possible. The post context has its own handlebars expression for the content, ie {{content}}, so if you were able to embed handlebars expressions into {{content}} it would have to be recursive, which it is not.
To be more precise, in Ghost each post has its own handlebars context.
The content of each post is already a handlebars expression that gets used in your layout.
When showing your post, handlebars interprets your post content as marked up text, not as another handlebars layout, so it will not interpolate the variables with your post's content.
Upvotes: 2