Remote JSON requests from inside a template file

Hello,

for some of my pages, I would like to call a remote JSON API and render the content as part of the pages. Is there a way to make server-side remote call from inside Ghost. Perhaps, you would know about a plugin or extension that does that?

2 Likes

Ghost currently doesn’t have active support for extensions or plugins. Themes are designed to be cacheable and static, so there isn’t support for pulling in external content. Your best bet is to use client side js

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Thanks for the quick reply! One topic I wanted to ping for an update is this:

@dandv calling a remote JSON API in templates is still out of scope and against the intention of the handlebars theming layer which is unlikely to change. As mentioned above your best bet is to use client side js, alternatively you could work with other headless/serverless tech such as CloudFlare Workers which would allow you to inject content into responses.