diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-04 21:08:40 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-04 21:08:40 -0800 |
commit | 83b326b005c3917cee9a475bbac00462cd5ffe5a (patch) | |
tree | 882c476c73d58f8ffcd07029f9daf77dc6ad210f /src/Text/Pandoc | |
parent | a7b8351d436434165c6cc70ba855322c76c102cf (diff) | |
download | pandoc-83b326b005c3917cee9a475bbac00462cd5ffe5a.tar.gz |
EPUB: removed need for separate epub-titlepage template.
The titlepage stuff is now folded into the epub-page template.
A titlepage variable selects it.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index dabb9722b..ec51253e7 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -95,9 +95,6 @@ writeEPUB version opts doc@(Pandoc meta _) = do let sourceDir = writerSourceDirectory opts' let mbCoverImage = lookup "epub-cover-image" vars - titlePageTemplate <- readDataFile (writerUserDataDir opts') - $ "templates" </> "epub-titlepage" <.> "html" - -- cover page (cpgEntry, cpicEntry) <- case mbCoverImage of @@ -111,11 +108,9 @@ writeEPUB version opts doc@(Pandoc meta _) = do , [mkEntry coverImage imgContent] ) -- title page - let tpContent = fromStringLazy $ writeHtmlString - opts'{writerTemplate = titlePageTemplate, - writerHtml5 = epub3, - writerVariables = vars} - (Pandoc meta []) + let tpContent = renderHtml $ writeHtml opts'{ + writerVariables = ("titlepage","true"):vars } + (Pandoc meta []) let tpEntry = mkEntry "title_page.xhtml" tpContent -- handle pictures |