Git for keeping a master template


#1

Does anyone manage multiple jekyll sites using a master setup? I am wondering what the workflow would be for this sort of thing. It would look something like this:

Master - base template with a set of plugins and generic configurations
branch 1 - website 1 which has new content files and specific branding
branch 2 - website 2, same as branch 1 except for a different brand.
branch 3 etc.

If you change something in the master branch, the updates will merge into branch 1, 2 and 3. changes to the style of the site can also happen in a branch and go back up the chain in the reverse direction.

In this scenario I imagine the merges would really only involve things like the layouts and a master stylesheet.


#2

You might want to look into git submodules. I’ve seen a few blog posts out there that describe how you can use different repositories to manage various parts of your site (content, theme, plugins, etc.) and then use a “master” repository to bring them all in.

Don’t think branches would allow you that flexibility.


#3

I use different repo’s. One repo with the theme, and each site its own repo. Install the theme as a Gem, and use it that way for each site.

It has been my experience that each site will want to create its own additions to the theme (or changes) and branching simply won’t work.

Basically, its what theme’s are for :slight_smile: