@@ -140,7 +140,7 @@ writeEPUB version opts doc@(Pandoc meta _) = do
140140 let chapToEntry :: Int -> [Tag String] -> Entry
141141 chapToEntry num ts = mkEntry (showChapter num)
142142 $ fromStringLazy
143− $ renderTemplate [("body",renderTags ts)]
143+ $ renderTemplate [("body",renderTags ts), ("pagetitle",show num)]
144144 $ pageTemplate
145145
146146 let chapterEntries = zipWith chapToEntry [1..] chunks
@@ -173,8 +173,9 @@ writeEPUB version opts doc@(Pandoc meta _) = do
173173 Pandoc meta [Plain t]
174174 let plainTitle = plainify $ docTitle meta
175175 let plainAuthors = map plainify $ docAuthors meta
176− let plainDate = maybe "" id $ normalizeDate $ stringify $ docDate meta
177176 currentTime <- getCurrentTime
177+ let plainDate = maybe (showDateTimeISO8601 currentTime) id
178+ $ normalizeDate $ stringify $ docDate meta
178179 let contentsData = fromStringLazy $ ppTopElement $
179180 unode "package" ! [("version", case version of
180181 EPUB2 -> "2.0"