Front-matter-like variables for Ghost

Hi. I am migrating from Jekyll (love it) to Ghost. Jekyll is amazingly good, but its not the best to use once the team grows. So I am studying Ghost, and there is a possible deal-breaker for me is that its does not support custom, front-matter like variables to posts and pages here is how it works.

For instance, I use several custom fields in Jekyll’s front-matter, easily adding new variables to my template. Like, we credit the reporter, the editor, the data analyst, not just the authors, so I need custom fields {{ editors }} {{ data_analysts }} and so on. We also add the data we use, for transparency. Here is an example of a post and its correspondent file.

For instance, to add the data I used for a story I can just add the variables: open_data_source and open_data_link to the front-matter of the post .md file. In my layout, I would add:

{% if page.open_data_source %}
<h4><a href="{{ open_data_link }}">{{ open_data_source }}</h4>
{% endif %}

I cannot find a way to add those custom variables to a Ghost post, at least not in an easy, direct way. I have seen several posts about custom helpers and attributes and how Ghost does not support it, but since I am new I might be missing something.

This would be an amazing thing to have, it would really bring Ghost to a new level for me.

Hope someone can help me to figure it out.

Hi @sergiovolt I have created a tool called Gaspr.io that adds custom fields to Ghost using handlebars templates. You create your custom fields, create a template, set the data for posts and pages and add the template to the page/post. Gaspr will take care of rendering that data anytime you change it.

Feel free to take a look and let me know if there is anything I can do to help.

https://gaspr.io