Adding pages from other GitHub repos on personal Jekyll website

I have a personal blog hosted my GitHub repo. I have other repositories (for example, this with its own page) whose content I would like to put inside my personal blog without copying the content from these other repos.

I would like the posts from my other repos to show on my Blog’s homescreen (and within the site) without copying the contents from these repos to my blog repo.

Possibly you could do this with Git submodules, which Github-Pages supports:

Just adding the repo as a submodule (with https) did not do anything for me.

Have a look at other posts from the last few months on the forum. There were a few ways suggested.

I don’t think GitHub Pages supports submodules. Oh I see answer above says it does.

GitHub Actions does too, but you have to add something to the standard clone step.

See my Hexo site here which has a submodules param to pull in a repo which is a theme in this case.

It would have been nice for you to share the file but I tracked it down here for reference for others.

Does it work locally at least? You have to run a command to update / pull in submodules.

The submodule is being cloned inside the _posts directory, and Jekyll will ignore it because it isn’t a Markdown post.

You could try putting the submodule elsewhere, for example in the images directory:

[submodule "_posts/compilation-of-3d-mesh-model-resources"]
	path = images
	url =

Then you can access the submodule images with URLs like:

1 Like

I only want the README from that repo (which is a markdon post). @MichaelCurrin, I also tried your method with GitHub Actions with no success unfortunately.

Jekyll needs the posts to have a specific filename format. I created a new post and referenced the README from the submodule using

{% include_relative <relative-path-to-submodule>/ %}

and it worked. Thank you guys.

1 Like