git.iko.soy/typeable/pandoc
on master help sign in
Use regular page template for nav.xhtml.
91a26fcJohn MacFarlane
src/Text/Pandoc/Writers/EPUB.hs+8−11
@@ -611,17 +611,14 @@ writeEPUB opts doc@(Pandoc meta _) = do
611 (_:_) -> [unode "ol" ! [("class","toc")] $ subs]
611 (_:_) -> [unode "ol" ! [("class","toc")] $ subs]
612
612
613 let navtag = if epub3 then "nav" else "div"
613 let navtag = if epub3 then "nav" else "div"
614− let navData = UTF8.fromStringLazy $ ppTopElement $
614+ let navBlocks = [RawBlock (Format "html") $ ppElement $
615− unode "html" ! [("xmlns","http://www.w3.org/1999/xhtml")
616− ,("xmlns:epub","http://www.idpf.org/2007/ops")] $
617− [ unode "head" $
618− [ unode "title" plainTitle
619− , unode "link" ! [("rel","stylesheet"),("type","text/css"),("href","stylesheet.css")] $ () ]
620− , unode "body" $
621− unode navtag ! [("epub:type","toc") | epub3] $
615+ unode navtag ! [("epub:type","toc") | epub3] $
622− [ unode "h1" ! [("id","toc-title")] $ plainTitle
616+ [ unode "h1" ! [("id","toc-title")] $ plainTitle
623− , unode "ol" ! [("class","toc")] $ evalState (mapM (navPointNode navXhtmlFormatter) secs) 1]
617+ , unode "ol" ! [("class","toc")] $ evalState (mapM (navPointNode navXhtmlFormatter) secs) 1]]
624− ]
618+ let navData = renderHtml $ writeHtml opts'
619+ (Pandoc (setMeta "title"
620+ (walk removeNote $ fromList $ docTitle' meta) nullMeta)
621+ navBlocks)
625 let navEntry = mkEntry "nav.xhtml" navData
622 let navEntry = mkEntry "nav.xhtml" navData
626
623
627 -- mimetype
624 -- mimetype