Comments (1)
You can fix the cover: #64 (comment)
I believe the TOC being in the TOC is not so bad, in some retail epubs I see the same.* However there is a distinction between the actual TOC that is on a page, and the virtual one that the readers open for you and render with their own design. In the latter I think it's helpful to include the TOC link and some retail ones do that. In the other one, not so much and I never seen that in production.
How do retail epubs put the contents link in the calibre reader sidebar or the device-rendered toc, but not redundantly into the content page? I've seen that the toc page that the device uses is not registered to be in the spine. In calibre's editor, file browser panel, the tox.xhtml (EPUB 3) is not among the Text, is under Misc. There is a different one, a copy, without the contents link that is simply regular content which appears to be a list of links, and is styled a bit differently and more manually, as anything goes there. Epub-gen has 1 toc for all purposes, you can reach it by paging in the book and it's also used as the device-rendered one.
I'll take a look at what template can be modified to leave it out from there. Removing the table of contents entry from the table of contents:
<li class="table-of-content">
<a href="toc.xhtml">- <%= tocTitle %> -</a>
</li>
This needs to go from your local copy of toc.xhtml.ejs
that you source using the top-level option:
customHtmlTocTemplatePath: path.join(__dirname, 'templates', 'toc.xhtml.ejs'),
If you want to retain it but remove those pesky dashes from its side, this is also the way.
In the end, I prefer to have no TOC link in the TOC, since readers have their own UI way of opening it. Having it in the content bears no real benefit (I'd even go as far as omitting it entirely or placing it at the end) besides going through the names of chapters before/after reading a book. But realistically, say, if you are on page 398 of a book and you want to look at the contents, the first thing you do is to bring up the device/readerapp's rendering of the TOC and not navigate to page 2...
from epub-gen.
Related Issues (20)
- Alternative: cpiber/epub-gen-memory for both node and browser
- Error with image URL HOT 3
- Custom fonts not getting applied in Epub Reader/Kindle Previewer
- The process randomly stop when downloading lots of images HOT 2
- Epub to html HOT 1
- Handle images which starts with relative path HOT 2
- Missing Hard timeout & Retry mechanism when downloading images. HOT 2
- insert video or audio into epub HOT 2
- Error: ENOTDIR, not a directory HOT 2
- fixed layout or reflowable layout
- Images and fonts do not appear on Apple Books HOT 3
- Custom ids gets converted to something another
- verbose: false outputs some logs
- verbose: false not working
- Showing different pub on different reader.
- Add tempDir option to documentation HOT 1
- Object prototype may only be an Object or null: undefined
- [Question] Remove Table of Contents
- Please mark epub-gen as deprecated if it's no longer maintained. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epub-gen.