Best practices installing Jekyll theme using git submodules

I've just started using Jekyll and I was surprised I couldn't find any reference regarding best practices when applying a theme. Most people say you should start by forking a Github repo (theme) and customize it from there, copying posts and configs on top of the forked project. No need to say this makes your life a lot more difficult when you need to update your theme in the future.

Update — 2016–04–11
Looks like Jekyll team is already working on it. Themes will be released as Gems. Great news! More info here.

It's always important to choose a very flexible theme where you can configure nearly everything from _config.yml file. I did some digging and found Jekyll Documentation Theme a pretty good example.

You should be using git submodules in order to keep your design updated and your repository cleaner.

Create a blank repository (or use your existing one) and add your theme as submodule

You should have a repository with posts and configuration only (some symlinks may also be necessary, keep reading). So, init your desired submodule with your desired theme.

Configure your repository using your theme as submodule

Your _config.yml should reference parts inside your theme's directory.

Use symlinks to "add" other required directories

This step should be based on each theme's architecture. That's why it's important to work with themes very well written and tested.

The chosen theme for this article is using css and js directories. We don't want to copy over all required files, so we just use symlinks.

Create a test page

That's pretty much it. Now you create a test page index.md.

That's it! Now you just have to use git submodule commands in order to keep your theme updated.

Another approach for posts is to have your _posts directory as another submodule.