Get two Kirby sites to share pages


#1

Ok so I have 2 Kirby sites, one for my personal work and the other for my business. I have some work from my business site that is also on my personal site, but right now, I manually copy over the content and re-save the pages. However I have just updated one of the sites and now blue prints are too different to do that.

Im aware that Kirby can run headless, but I don’t know where to start with pulling the content from one site into the other and mixing it with the content on that site, as if they were in the same place.

What is the best way forward?


#2

Why would you need the blueprints if you edit the content only on one site? Are we talking about two different Kirby versions here?


#3

I got around it before by making sure that the blueprints / template logic matched on both sites for the areas that contain the work. Then could just copy over the content file from one to the other.

But now I want to automate it, so that one site automatically pulls content from the other and displays it along with the content that is on that site.

Basically i want to feed all the children of this page on this site https://hashandsalt.com/work into this page on this site https://jamessteel.co.uk/work BUT mix it with the work that is on that page already.

I think i need to setup a plugin, something like this article describes, then pull into the other site via PHP? Unless there is a better way. I would like to avoid javascript.

Perhaps it’s less of a headache to just put all the work on site A and feed it all into site B.


#4

I don’t know how different these works are, but if they use different blueprints (i.e. have different field), then you could just use a different snippet on the personal site (with an if statement that checks the intendedTemplate) and you can continue as before with just copying the stuff over.

It’s probably not worth the hassle of going headless or coming up with some sort of plugin for something that is completely under your control.


#5

Well, I don’t mind the hassle so much, because it’s learning something new. Maybe I will just forget it and redesign the personal site instead to link off to the other site.