EPUB: removed need for separate epub-titlepage template.
The titlepage stuff is now folded into the epub-page template. A titlepage variable selects it.
This commit is contained in:
parent
a7b8351d43
commit
83b326b005
4 changed files with 6 additions and 11 deletions
2
README
2
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cd898b1d2febb88686054e4a63690b8c7891ae03
|
||||
Subproject commit 1709949ce52424737549c365cf549995df0435e0
|
Loading…
Reference in a new issue