3

I'm switching my site from Jekyll to Ghost due to non-maintainable code since my site contains a large number of posts(~2500). Since, Jekyll uses YAML frontmatter I'm able to add custom key value pairs in it. I would like to accomplish the same using Ghost.

I will not add the contents to the post since the difference among all the posts is very small. So, I'm planning to access the data in the post template and render it at runtime using Handlebars.js, thus avoiding code repetition and enhancing maintainability.

I'm going to use the API to add new posts and hence I'm wondering whether there is an option for it. I googled for this problem but I cannot find one. I'm using sqlite as the database.

Gowtham
  • 11,853
  • 12
  • 43
  • 64

2 Answers2

1

Ghost currently (v0.6.4) does not have support for custom values. You would either have to make modifications to Ghost and add in these custom key values to the post template or wait for Ghost Apps to be released.

Reedyn
  • 321
  • 2
  • 8
1

I have managed to add custom key value pairs in Ghost CMS.

More on this Extend Ghost CMS

This approach is based on extending handlebars to recognize new blocks of data and return selective html

Faiz Mohamed Haneef
  • 3,418
  • 4
  • 31
  • 41