summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/book.js6
-rw-r--r--lib/output/website.js7
2 files changed, 8 insertions, 5 deletions
diff --git a/docs/book.js b/docs/book.js
index b04e91c..988abb2 100644
--- a/docs/book.js
+++ b/docs/book.js
@@ -1,10 +1,10 @@
var pkg = require('../package.json');
module.exports = {
- "title": "GitBook Documentation",
+ title: 'GitBook Documentation',
- plugins: ["theme-official"],
- theme: "official",
+ plugins: ['theme-official'],
+ theme: 'official',
variables: {
version: pkg.version
}
diff --git a/lib/output/website.js b/lib/output/website.js
index 01021e5..d35ece3 100644
--- a/lib/output/website.js
+++ b/lib/output/website.js
@@ -60,6 +60,10 @@ WebsiteOutput.prototype.prepare = function() {
throw new Error('Theme "' + themeName + '" is not installed, add "' + themeID(themeName) + '" to your "book.json"');
}
+ if (that.themeDefault.root != that.theme.root) {
+ that.log.info.ln('build using theme "' + themeName + '"');
+ }
+
// This list is ordered to give priority to templates in the book
var searchPaths = _.chain([
// The book itself can contains a "_layouts" folder
@@ -76,14 +80,13 @@ WebsiteOutput.prototype.prepare = function() {
.value();
// Load i18n
- _.each(searchPaths.reverse(), function(searchPath) {
+ _.each(searchPaths.concat().reverse(), function(searchPath) {
var i18nRoot = path.resolve(searchPath, '_i18n');
if (!fs.existsSync(i18nRoot)) return;
that.i18n.load(i18nRoot);
});
-
that.env = new nunjucks.Environment(new nunjucks.FileSystemLoader(_.map(searchPaths, templatesPath)));
that.env.addFilter('t', function(s) {