Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPUB cover image and author information not displaying as expected #715

Closed
1 task done
geealbers opened this issue Apr 21, 2023 · 5 comments
Closed
1 task done
Assignees
Labels
bug Actual behavior does not match expected behavior output:epub An issue with the epub output

Comments

@geealbers
Copy link
Member

Before proceeding, check to make sure there isn’t an existing issue for this bug.

  • I have searched the existing issues and determined this is a new bug.

Steps to reproduce

  1. Start a new Quire project
  2. Run quire build and then quire epub to create the EPUB file
  3. Run the EPUB through epubcheck with java -jar path/to/epubcheck.jar patt/to/epubjs.epub

Actual behavior

We're including a static cover image and creator information in the _epub/manifest.json file, but neither are showing up where expected. For instance when opening the file in Apple Books a thumbnail of the cover should appear, but it's only a Apple's default background, the book title, and "Unknown Author". The snippet of the manifest is below. I believe the cover file path is correct, not sure if the structure/naming of the JSON itself doesn't match epub.js expectations.

{
  "@context": [
    "https://schema.org",
    "https://www.w3.org/ns/pub-context"
  ],
  "conformsTo": "https://www.w3.org/TR/pub-manifest/",
  "contributors": [],
  "cover": "_assets/images/static-cover.jpg",
  "creators": [
    {
      "name": "Judith Keller",
      "role": "aut",
      "file-as": "Keller, Judith"
    }
  ],

Screen Shot 2023-04-21 at 3 13 29 PM

Expected behavior

I'd expect to see the cover image in in the e-book reader interface in various places, and the author to be listed.

Version numbers

quire-cli 1.0.0-rc.6
quire-11ty 1.0.0-rc.8
node 18.12.1

What browsers are you seeing the problem on?

No response

Relevant Terminal/Shell output

No response

Supporting Information

No response

@geealbers geealbers added the status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. label Apr 21, 2023
@fchasen
Copy link
Collaborator

fchasen commented May 17, 2023

This should be in resources as:

"resources": [
        {
            "url": "_assets/images/static-cover.jpg",
            "rel": "cover-image"
        }
]

but I think this is a common enough use-case when creating Epubs that I should update the CLI to look for it.

@fchasen
Copy link
Collaborator

fchasen commented May 19, 2023

Added the cover parsing for the next epub.js release, and fixed the key.name issue that was preventing the creators from working in the CLI.

@geealbers
Copy link
Member Author

@fchasen The creator is still not being added to the package.opf file correctly:

<dc:creator>[object Object]</dc:creator>

I assume it has something to do with the way the info is structured in the manifest.json we're feeding in? Can you advise? This is what we have in manifest.json now:

  "creators": [
    {
      "name": "Judith Keller",
      "role": "aut",
      "file-as": "Keller, Judith"
    }
  ],

@geealbers geealbers reopened this Jun 28, 2023
@geealbers geealbers added status:in progress Issue is under development output:epub An issue with the epub output bug Actual behavior does not match expected behavior and removed status:triage needed Issue needs to be triaged by the Quire team. This label is automatically applied to new issues. labels Jun 28, 2023
@fchasen
Copy link
Collaborator

fchasen commented Jun 29, 2023

Thanks, for that snippet - epubjs-cli was looking for the wrong key.
Just released 0.1.4 with a fix for that.

@geealbers
Copy link
Member Author

Awesome. Thanks for the quick response!

@Erin-Cecele Erin-Cecele removed the status:in progress Issue is under development label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual behavior does not match expected behavior output:epub An issue with the epub output
Projects
None yet
Development

No branches or pull requests

3 participants