lib/output/ebook/onFinish.js: Use lowercase summary.html filename from themes

This commit is contained in:
Johan Preynat
2016-05-02 16:25:57 +02:00
parent bbba52c7ff
commit d75d8729be
+4 -3
View File
@@ -9,6 +9,7 @@ var command = require('../../utils/command');
var writeFile = require('../helper/writeFile');
var getConvertOptions = require('./getConvertOptions');
var SUMMARY_FILE = 'SUMMARY.html';
/**
Write the SUMMARY.html
@@ -20,12 +21,12 @@ function writeSummary(output) {
var options = output.getOptions();
var prefix = options.get('prefix');
var filePath = 'SUMMARY.html';
var filePath = SUMMARY_FILE;
var engine = WebsiteGenerator.createTemplateEngine(output, filePath);
var context = JSONUtils.encodeOutput(output);
// Render the theme
return Templating.renderFile(engine, prefix + '/SUMMARY.html', context)
return Templating.renderFile(engine, prefix + '/summary.html', context)
// Write it to the disk
.then(function(html) {
@@ -53,7 +54,7 @@ function runEbookConvert(output) {
.then(function(options) {
var cmd = [
'ebook-convert',
path.resolve(outputFolder, 'SUMMARY.html'),
path.resolve(outputFolder, SUMMARY_FILE),
path.resolve(outputFolder, 'index.' + format),
command.optionsToShellArgs(options)
].join(' ');