Aggregation site, posts from multiple installations - best way?

If I want to have one ghost site which pulls (aggregates) content (the posts w images, tags, content etc) from several Ghost installations, what would be the best approach?

Ideally something like {{post FROM site#1 }} {{post FROM site#2 }} which would be way out of my reach for JS coding, maybe there is a simpler way, which does not involve IFRAME’ing in the different sites…

I’m thinking this can be done as Custom Integration over the Content API… but I have no idea where to start. Any ideas?
/magnus

2 Likes

Hi @mheland! Your last idea about integrating with Content API might be a good way to go in this situation. But that would involve a bit of work to pull down the content from different sources. For example, if you go withGatsby frontend, you might need to extend gatsby-source-ghost to handle multiple instances of Content API SDK.

If it’s possible in your situation, you could rather aggregate all the posts on one Ghost instance and differentiate them through tagging for example? Then you would not need to do any new magic and just use existing filtering available in {{get}} helper to pull down the content.

Only old magic! I’m more confident with Python and found a Ghost API client for Pyhon, https://pypi.org/project/ghost-client/ EDIT - just realized is not using the Ghost 2.0 Content API, ouch

The Python client can pull posts from a remote installation through remoteghost = Ghost('http://remote-ghost-site.com:80'....) and create local posts with
localpost = localghost.posts.create(...) …then I’ll cron this script in the background or… hmmm…yes, better, create a webhook which executes it.

I’ll write a specific tag in the post identifying the origin site, and make sure there’s a URL button/link somewhere taking a visitor to originating site. Nice. Very nice. Thank you, clearly the best option.

1 Like

Hi,

I am also trying to get something like that. I looked into the gatsby-source-ghost thing but I am not very satisfied with the HTML output generated by Gatsby.

You can also achieve this by using a zappier task with Ghost > Ghost. When a new post is created create a new one in the other Blog. You can even submit the canonical URL and so you are save for the search engines.

when there is some time I will see if I can get something to work that can read the posts directly from multiple source blogs.

CU,
KirK