Check page online

GitHub says it can take up to ten minutes, but usually it's only about 1 -2
minutes. So wait for a notification email or keep pushing the browser's refresh
button!

Add as submodule in master branch

Now there are two separate branches called master and gh-pages. The next
step is to reference the gh-pages branch to a subdir of master. By the way,
it's not possible to reference a submodule at the root of another branch. But a
subdir is exactly what we want here.

What will happen? At first the index.markdown is parsed. The layout:
specification on top will search for a file called _layout/default.html, which
we've just created. Then the layout file will be filled with title and
content of the page. Note that you can put any variable in the header section
and use it in your layout as {{ page.lala }}.

Generate it in our subdir

To generate the website we just have to call jekyll in our project dir. This
will put the generated files straight to the _site dir, which is the default.
See the jekyll website what this _config.yml is all about.

Now go back to the project's root dir, and you'll see that _site has changed.
That's right! Because the submodule has been commited in the previous step.
So let's tell the master branch, that it should use exactly this revision.

$ git commit -a -m "build site"$ git push origin master

Now both branches should be pushed to github and master _site points to the up
to date gh-pages.

Regeneration of site

This is just a starting point. Of course you want to work with it, here is a
short list of the steps you're likely to perform.

Edit some file (e.g. index.markdown).

run jekyll to regenerate

check if in _site is what you want

add, commit and push changes in_site subdirectory

add, commit and push changes in the project (including _site subdir)

do it again!

One note about Jekyll's build-in options. When editing your sources it's very
useful to run a local server. This command will auto-regenerate the site on each
edit and show them via the local server at http://localhost:4567.