remove last page from toc

this is already include in kindle
This commit is contained in:
Celogeek 2023-04-08 11:28:25 +02:00
parent 0e9ae95df0
commit bcfd342026
Signed by: celogeek
SSH Key Fingerprint: SHA256:njNJLzoLQdbV9PC6ehcruRb0QnEgxABoCYZ+0+aUIYc
2 changed files with 1 additions and 3 deletions

View File

@ -234,7 +234,6 @@ func (e *ePub) Write() error {
{"OEBPS/nav.xhtml", e.render(navTmpl, map[string]any{
"Title": title,
"TOC": string(toc),
"Last": part.Images[len(part.Images)-1],
})},
{"OEBPS/Text/style.css", styleTmpl},
{"OEBPS/Text/part.xhtml", e.render(partTmpl, map[string]any{

View File

@ -9,9 +9,8 @@
<nav epub:type="toc" id="toc">
<h1>Table of content</h1>
<ol>
<li><a href="Text/part.xhtml">Title</a></li>
<li><a href="Text/part.xhtml">{{ .Title }}</a></li>
{{ .TOC }}
<li><a href="Text/{{ .Last.Id }}_p{{ .Last.Part}}.xhtml">Last page</a></li>
</ol>
</nav>
</body>