From b7c783aec575d337e22e089d898bcd6174252415 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:18:21 +0100 Subject: [PATCH] part is the first page --- internal/epub/core.go | 4 ++-- internal/epub/templates/nav.xhtml.tmpl | 4 ++-- internal/epub/templates/toc.ncx.tmpl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/epub/core.go b/internal/epub/core.go index 8e1429e..4ae536d 100644 --- a/internal/epub/core.go +++ b/internal/epub/core.go @@ -156,8 +156,8 @@ func (e *ePub) Write() error { content := []zipContent{ {"META-INF/container.xml", containerTmpl}, {"OEBPS/content.opf", e.render(contentTmpl, map[string]any{"Info": e, "Images": part.Images})}, - {"OEBPS/toc.ncx", e.render(tocTmpl, map[string]any{"Info": e, "Image": part.Images[0]})}, - {"OEBPS/nav.xhtml", e.render(navTmpl, map[string]any{"Info": e, "Image": part.Images[0]})}, + {"OEBPS/toc.ncx", e.render(tocTmpl, map[string]any{"Info": e})}, + {"OEBPS/nav.xhtml", e.render(navTmpl, map[string]any{"Info": e})}, {"OEBPS/Text/style.css", styleTmpl}, {"OEBPS/Text/part.xhtml", e.render(partTmpl, map[string]any{ "Info": e, diff --git a/internal/epub/templates/nav.xhtml.tmpl b/internal/epub/templates/nav.xhtml.tmpl index f485174..ad46f3f 100644 --- a/internal/epub/templates/nav.xhtml.tmpl +++ b/internal/epub/templates/nav.xhtml.tmpl @@ -8,12 +8,12 @@ diff --git a/internal/epub/templates/toc.ncx.tmpl b/internal/epub/templates/toc.ncx.tmpl index 22d9fbe..b442324 100644 --- a/internal/epub/templates/toc.ncx.tmpl +++ b/internal/epub/templates/toc.ncx.tmpl @@ -9,6 +9,6 @@ {{ .Info.Title }} -{{ .Info.Title }} +{{ .Info.Title }} \ No newline at end of file