add a title page

The first page of the book is the title
This commit is contained in:
Martin Trigaux 2017-10-28 10:37:56 +02:00
parent 1953a87293
commit a6e9ad0b7d

View file

@ -190,7 +190,8 @@ class EntriesExport
// in filenames, we limit to A-z/0-9
$filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle());
$chapter = $content_start . $entry->getContent() . $bookEnd;
$titlepage = "<h1>".$entry->getTitle()."</h1>";
$chapter = $content_start . $titlepage . $entry->getContent() . $bookEnd;
$book->addChapter($entry->getTitle(), htmlspecialchars($filename) . '.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
}