EPUB writer: include title page in landmarks.

Closes #6919.

Note that the toc is also included if `--toc` is specified.
This commit is contained in:
John MacFarlane
2020-12-03 21:39:44 -08:00
parent 9c6cc79c11
commit 7199d68ba0
2 changed files with 9 additions and 3 deletions
+7 -2
View File
@@ -825,7 +825,12 @@ pandocToEPUB version opts doc = do
[ unode "h1" ! [("id","toc-title")] $ tocTitle
, unode "ol" ! [("class","toc")] $ tocBlocks ]]
let landmarkItems = if epub3
then [ unode "li"
then unode "li"
[ unode "a" ! [("href",
"text/title_page.xhtml")
,("epub:type", "titlepage")] $
("Title Page" :: String) ] :
[ unode "li"
[ unode "a" ! [("href", "text/cover.xhtml")
,("epub:type", "cover")] $
("Cover" :: String)] |
@@ -834,7 +839,7 @@ pandocToEPUB version opts doc = do
[ unode "li"
[ unode "a" ! [("href", "#toc")
,("epub:type", "toc")] $
("Table of contents" :: String)
("Table of Contents" :: String)
] | writerTableOfContents opts
]
else []
+2 -1
View File
@@ -6,7 +6,8 @@
<p><span id="nav.xhtml"></span></p>
<nav type="landmarks" id="landmarks" hidden="hidden">
<ol>
<li><a href="#nav.xhtml#toc">Table of contents</a></li>
<li><a href="text/title_page.xhtml">Title Page</a></li>
<li><a href="#nav.xhtml#toc">Table of Contents</a></li>
</ol>
</nav>
<p><span id="ch001.xhtml"></span></p>