Update the initGitbook function.
Using the version proposed by benmarwick.