Change site content and design based on context

First I would suggest thinking about what your overall goal is and if duplicating content makes sense. It is far simpler to focus content that is different on each site and then make a hyperlink to the other site where you need to.

If you do indeed want to duplicate content, I have tips.

I answered a post in Jan on something similar to your question. You can use a submodule or clone process to pull in your content from a single third repo of content only, that gets used by the two Jekyll sites.
You can pull in from the frontend as well with JS but that is bad for crawlers due to the JS loading needed.