aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--pandoc.cabal2
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs11
m---------templates12
4 files changed, 10 insertions, 17 deletions
diff --git a/README b/README
index 77de7cbf4..0d79c05a2 100644
--- a/README
+++ b/README
@@ -661,7 +661,7 @@ by putting a file `templates/default.FORMAT` in the user data
directory (see `--data-dir`, above). *Exceptions:* For `odt` output,
customize the `default.opendocument` template. For `pdf` output,
customize the `default.latex` template. For `epub` and `epub3` output,
-customize the `epub-page.html`, and `epub-titlepage.html` templates.
+customize the `epub-page.html` template.
Templates may contain *variables*. Variable names are sequences of
alphanumerics, `-`, and `_`, starting with a letter. A variable name
diff --git a/pandoc.cabal b/pandoc.cabal
index 279b327b9..5b7f65b94 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -49,7 +49,7 @@ Data-Files:
templates/default.slideous,
templates/default.dzslides, templates/default.asciidoc,
templates/default.textile, templates/default.org,
- templates/epub-titlepage.html, templates/epub-page.html,
+ templates/epub-page.html,
-- data for ODT writer
reference.odt,
-- data for docx writer
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
diff --git a/templates b/templates
-Subproject cd898b1d2febb88686054e4a63690b8c7891ae0
+Subproject 1709949ce52424737549c365cf549995df0435e