From d6eb8e4c6042262408c3c0b8d67bccecfa4bf882 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Mon, 16 Jun 2014 18:52:36 -0700 Subject: [PATCH] Support URLs in "github" config Fixes GitbookIO/gitbook.io#90 --- lib/generate/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/generate/index.js b/lib/generate/index.js index 740f6bae6..444f75f9b 100644 --- a/lib/generate/index.js +++ b/lib/generate/index.js @@ -224,8 +224,15 @@ var generateBook = function(options) { options.github = null; return null; } else if(options.github) { - // Git already specified in options - return options.github; + // Git already specified in options + options.github = ( + // Support URLs in "github" entry of book.json + parse.git.githubID(options.github) || + + // Fallback + options.github + ); + return; } // Try auto detecting