diff --git a/internal/core/ebook.go b/internal/core/ebook.go index b03e3974e..d587f86c6 100644 --- a/internal/core/ebook.go +++ b/internal/core/ebook.go @@ -62,6 +62,12 @@ func GenerateEbook(deps *dependencies.Dependencies, req ProcessRequest, dstPath ebook.SetTitle(book.Title) ebook.SetAuthor(book.Author) + if deps.Domains.Storage.FileExists(bookmarkThumbnailPath) { + // TODO: Use `deps.Domains.Storage` to retrieve the file. + absoluteCoverPath := fp.Join(deps.Config.Storage.DataDir, bookmarkThumbnailPath) + coverPath, _ := ebook.AddImage(absoluteCoverPath, "cover.jpg") + ebook.SetCover(coverPath, "") + } ebook.SetDescription(book.Excerpt) _, err = ebook.AddSection(`

`+book.Title+`

`+book.HTML+lastline, book.Title, "", "") if err != nil {