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

Bug: When package manifest and toc are in different folders, navigation does not work. #1367

Open
pravin-d opened this issue Dec 3, 2023 · 0 comments

Comments

@pravin-d
Copy link

pravin-d commented Dec 3, 2023

Consider the folder structure

  • containerFile (has manifest element)
  • Text/ (folder containing all the pages)
  • Text/toc.html (toc file inside the folder)

in the container file the pages href are of the format

href="Text/somepage"

In toc file they defined as

href="../Text/somepage"

So in the spine, page maps will have a key Text/somepage for some page and while creating navigation for the same, we use the toc, which will give ../Text/somepage. When fetching the page using this.book.spine.get(target), the key won't match and the page will not be displayed
Solution:
To resolve the links in the toc file to match the ones found in the container file. Assuming the container file is always in the root folder.

pravin-d added a commit to pravin-d/epub.js that referenced this issue Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant