diff options
-rw-r--r-- | lib/book.js | 7 | ||||
-rw-r--r-- | lib/generators/website.js | 2 | ||||
-rw-r--r-- | theme/templates/ebook/glossary.html | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js index 650931f..6cdc3e6 100644 --- a/lib/book.js +++ b/lib/book.js @@ -10,6 +10,7 @@ var fs = require("./utils/fs"); var parseNavigation = require("./utils/navigation"); var parseProgress = require("./utils/progress"); var pageUtil = require("./utils/page"); +var batch = require("./utils/batch"); var links = require("./utils/links"); var logger = require("./utils/logger"); @@ -224,9 +225,11 @@ Book.prototype.generate = function(generator) { // Finally let's generate content .then(function() { - return _.reduce(ops["content"] || [], function(prev, file) { + var nFiles = (ops["content"] || []).length; + return _.reduce(ops["content"] || [], function(prev, file, i) { return prev.then(function() { - that.log.debug.ln("converting", file); + var p = ((i*100)/nFiles).toFixed(0)+"%"; + that.log.info.ln("processing", file, p); return Q(generator.convertFile(file)); }); }, Q()); diff --git a/lib/generators/website.js b/lib/generators/website.js index d40ffa8..a58e3c4 100644 --- a/lib/generators/website.js +++ b/lib/generators/website.js @@ -142,7 +142,7 @@ Generator.prototype.convertFile = function(input) { var basePath = path.relative(path.dirname(output), that.options.output) || "."; if (process.platform === 'win32') basePath = basePath.replace(/\\/g, '/'); - that.book.log.info.ln("write parsed file", page.path, "to", relativeOutput); + that.book.log.debug.ln("write parsed file", page.path, "to", relativeOutput); return that._writeTemplate(that.templates["page"], { progress: page.progress, diff --git a/theme/templates/ebook/glossary.html b/theme/templates/ebook/glossary.html index a9776ad..d4d46f2 100644 --- a/theme/templates/ebook/glossary.html +++ b/theme/templates/ebook/glossary.html @@ -4,7 +4,8 @@ {% block content %} <div class="page page-toc"> - <h1>Glossary</h1> + <h1 class="book-chapter book-chapter-1">{% i18n "GLOSSARY" %}Glossary{% endi18n %}</h1> + <h1>{% i18n "GLOSSARY" %}Glossary{% endi18n %}</h1> {% for item in glossary %} <section class="normal glossary" id="{{ item.id }}"> <h2><a href="#{{ item.id }}">{{ item.name }}</a></h2> |