]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add a title page
authorMartin Trigaux <me@mart-e.be>
Sat, 28 Oct 2017 08:37:56 +0000 (10:37 +0200)
committerMartin Trigaux <me@mart-e.be>
Sat, 28 Oct 2017 08:45:37 +0000 (10:45 +0200)
The first page of the book is the title

src/Wallabag/CoreBundle/Helper/EntriesExport.php

index 830798b822831900d069b712c1a767f912a851ec..1b4afa3baaa076d7b0f65048f9544252dcd3d8cd 100644 (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);
         }