]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/EntriesExport.php
add a title page
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / EntriesExport.php
index 06144ea9a8ad573b33d99354ca44b4d0a21618ae..1b4afa3baaa076d7b0f65048f9544252dcd3d8cd 100644 (file)
@@ -25,9 +25,9 @@ class EntriesExport
     private $language = '';
 
     /**
-     * @param TranslatorInterface $translator Translator service
-     * @param string $wallabagUrl Wallabag instance url
-     * @param string $logoPath    Path to the logo FROM THE BUNDLE SCOPE
+     * @param TranslatorInterface $translator  Translator service
+     * @param string              $wallabagUrl Wallabag instance url
+     * @param string              $logoPath    Path to the logo FROM THE BUNDLE SCOPE
      */
     public function __construct(TranslatorInterface $translator, $wallabagUrl, $logoPath)
     {
@@ -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);
         }