mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-19 09:06:03 +00:00
lib/output/ebook/onFinish.js: Use lowercase summary.html filename from themes
This commit is contained in:
@@ -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(' ');
|
||||
|
||||
Reference in New Issue
Block a user