One backend several front ends?

Hello,

I would appreciate any help to face a challenge I’m facing: Using just 1 CMS and loading a different set of posts according to the site we’re in.

We would have several hosts names:

  • blog.firstblog
  • blog.secondblog
  • blog.thirdblog

They would all share a database and the cms. I reckon I could add custom tags to posts, to classify them (first blog posts would be tagged as “first-blog”, second blog posts would be tagged as “second-blog”, and so on) and then load posts with specific tag according to the site we’re viewing. My questions are:

  • How can Ghost know whether we are in one site or the other?
  • How can I pass that information to the routes.yaml file to load a specific set of posts?

I’ve seen this thread but I was wondering if there have been any new features that make this achievable.

Thank you very much for your help.

Ghost isn’t designed to work that way so you won’t get it to work using Ghost’s built-in themes and routing.

If you switch to using a headless approach with a static site generator for each site then you could theoretically fetch content with specific tags and ensure you are manipulating the URLs in the content to match each site’s domain.

Overall though, if these are separate sites you’ll likely be better off having a separate Ghost instance for each.

1 Like

@Kevin thank you for your help! We’ll consider the headless approach.

Thanks!