thephilgray / gulp-epub-starter

An opinionated static EPUB generator with Less and BrowserSync + Readium Cloud Reader for live reload development.
2 stars 0 forks source link

Generate TOC from headings #45

Open thephilgray opened 5 years ago

thephilgray commented 5 years ago

Incorporate https://github.com/thephilgray/node-toc-generator to parse headings from markup and pass toc object to templates

thephilgray commented 5 years ago

This has been implemented in local branches, but it breaks another feature.

Currently, the TOC is built from metadata.yaml. This is fine. Ideally, the autogenerated TOC should be implemented as an option. It's possible to just create separate TOC templates for autogenerated and manual. But this is creates poor development experience, not to mention that if you choose not to use the autogenerated template, you will still pay the cost in computing.

For better development experience: