aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Trigaux <me@mart-e.be>2017-10-28 10:37:56 +0200
committerMartin Trigaux <me@mart-e.be>2017-10-28 10:45:37 +0200
commita6e9ad0b7d4108a170b7d2e43576377bb0ad7516 (patch)
tree72b7835006ffd1714303ee92a088846ee811ab35
parent1953a872932a63792293b4aec087880265ba89f7 (diff)
downloadwallabag-a6e9ad0b7d4108a170b7d2e43576377bb0ad7516.tar.gz
wallabag-a6e9ad0b7d4108a170b7d2e43576377bb0ad7516.tar.zst
wallabag-a6e9ad0b7d4108a170b7d2e43576377bb0ad7516.zip
add a title page
The first page of the book is the title
-rw-r--r--src/Wallabag/CoreBundle/Helper/EntriesExport.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
index 830798b8..1b4afa3b 100644
--- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php
+++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php
@@ -190,7 +190,8 @@ class EntriesExport
190 // in filenames, we limit to A-z/0-9 190 // in filenames, we limit to A-z/0-9
191 $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle()); 191 $filename = preg_replace('/[^A-Za-z0-9\-]/', '', $entry->getTitle());
192 192
193 $chapter = $content_start . $entry->getContent() . $bookEnd; 193 $titlepage = "<h1>".$entry->getTitle()."</h1>";
194 $chapter = $content_start . $titlepage . $entry->getContent() . $bookEnd;
194 $book->addChapter($entry->getTitle(), htmlspecialchars($filename) . '.html', $chapter, true, EPub::EXTERNAL_REF_ADD); 195 $book->addChapter($entry->getTitle(), htmlspecialchars($filename) . '.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
195 } 196 }
196 197