Enable Ghost to dynamically generate a post using data from our database

Hi there,

We want Ghost to render a page dynamically based on data we have in our database. Is that possible?

For example, imagine we have a table of fruits in our database. We want to create two pages in Ghost. One where we have a list of all fruits and another one where we display the details about one specific fruit.

Is this possible?

One idea we have is to export each fruit to Ghost’s admin API as a blog post every time a fruit is created or updated in the database. Then, we can use a couple custom templates to render the UI. But the problem here is what format do we use for the fruit data. Can we export the fruit as JSON and if so how does a template access that JSON?

Thanks!