# Build a jekyll site out of several repositories (github))

**URL:** <https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227>\
**Category:** Help\
**Created:** [April 15, 2020, 12:03pm UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227 "2020-04-15T12:03:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vongomben](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/vongomben/32/343_2.png) [@vongomben](https://talk.jekyllrb.com/u/vongomben)\
**Post date:** [April 15, 2020, 12:03pm UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227/1 "2020-04-15T12:03:13Z")

</div>

Hi there.  
I’ve previously [shared a similar issue](https://talk.jekyllrb.com/t/gigthub-hosted-jekyll-on-gh-pages-taking-contents-and-posts-from-other-repositories/777), which I ended up solving in another way).

I’m a teacher and use github pages for creating landing pages for a season course.  
I’d like to have a github page with all the \_posts in several github hostes sites.

How do I do that?  
How do I tell jekyll to build a site putting together sevearl different contents?

Thanks in advance for the reply.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [April 15, 2020, 1:58pm UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227/2 "2020-04-15T13:58:23Z")

</div>

This has been done before I see. Can you create two folders with posts directories like where it worked for this case?

> <https://github.com/jekyll/jekyll/issues/1819#issuecomment-89003858>
>
> Hello,
> Currently I am rendering just one \_posts folder into one index.html. However, I would like to also render another \_poems directory...

---

<div class="post-metadata">

**Author:** ![vongomben](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/vongomben/32/343_2.png) [@vongomben](https://talk.jekyllrb.com/u/vongomben)\
**Post date:** [April 15, 2020, 3:12pm UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227/3 "2020-04-15T15:12:31Z")

</div>

Thanks Michael.  
My apologies I didnt’ explained the problem.  
I have repository A ([which is this one](https://github.com/OfficineArduinoTorino/ITS-Torino) / [Gh-pages](http://officinearduinotorino.github.io/ITS-Torino/schede/)) and repository B ([this](https://github.com/OfficineArduinoTorino/ITS-Torino-2016) / [Gh pages](http://officinearduinotorino.github.io/ITS-Torino-2016/schede/)). I want this and hipotethically N repositories to be rendered on a mother repository, that collects and possibly allow the tag research among all posts in the Schede folder (the post) .

Is it now more clear?  
thanks in advance

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [April 16, 2020, 4:15pm UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227/4 "2020-04-16T16:15:34Z")

</div>

There’s some prior art for pulling in content from other repos using git submodules. Google around, there are a few blog posts out there about it.

Mostly used to separate content from layout, but you could likely adapt it to have each `_posts` repo as their own module that is pulled into a master repo.

There’s also this new tool that allows you to pull content from various sources. What you want hasn’t been built yet but I believe the functionality is there to flesh it out.

> **[stackbithq/sourcebit](https://github.com/stackbithq/sourcebit)**
>
> Sourcebit helps developers build data-driven JAMstack sites by pulling data from any third-party resource - stackbithq/sourcebit

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [April 18, 2020, 11:11am UTC](https://talk.jekyllrb.com/t/build-a-jekyll-site-out-of-several-repositories-github/4227/5 "2020-04-18T11:11:08Z")

</div>

Yes submodules would work great for this. Multiple repos existing as folders in another repo. Submodules are versions at a commit though so you’ll have to update the parent repo with a commit to get the latest child repos
