Make use of github optional

Gitbook looks great to me, but I'd like to be able to use it on non-github hosted projects. These are the changes I needed to do so.