haroldtreen / epub-press-clients

📦 Clients for building books with EpubPress.
https://epub.press
GNU General Public License v3.0
585 stars 69 forks source link

Generate native EPUB table of contents #138

Open j-xella opened 1 year ago

j-xella commented 1 year ago

When I try creating an e-pub from multiple web pages, I get an e-pub with a special "Table of Contents" page at the beginnig, with links to each article. That is great, but it is just another page in the document.

EPUB format has native support for TOC. When a native TOC exists, many readers can display it, and it makes navigating faster. I wonder if e-pubs generated here could also have this feature?

Also, native EPUB TOC can be multilevel, so if #36 gets implemented, the headings could appear as subitems under the top level article entries in TOC.

haroldtreen commented 1 year ago

This sounds interesting. Would be a nice addition.

EpubPress mainly aggregates the content and then stitches it together with this library: https://github.com/kcartlidge/nodepub

Would need to likely update that to get the TOC working.