Comments (3)
Thanks @pedrosanta ,
Current OPF file template is a little some chaos, will improve it later.
BTW, what do you think of current option structure and Table of content (TOC)
template? If a flat array of html is enough for a epub structure? or should I change it to embedded array to support deeper levelsοΌ
from epub-gen.
Yep, don't really worry about this issue, I just created it to note an improvement that can be made to the EPUB 2 OFP guide part (which is blank I think), but, really as a nice to have, as... guide
has been deprecated in EPUB 3 (replaced by landmarks, that fall on the xhtml TOC). So, just leaving the issue as a note, actually.
Regarding the structure of TOC, I think it's OK at the moment. On the Reedsy book exporter we do have a TOC with deeper levels (which I build using a mix of adding a headings
property/array to the content and using that on custom templates).
But it's something I'm willing to discuss. An important thing we have to be in mind is... for each OPF content (which best practices say it should be on several HTMLs to improve readers content loading performance, exactly like the lib is doing, so OK on that part) I'm pretty sure the readers will break to a new page. (So using nested content for headings, in my case, wouldn't work.)
But I think this could fall on another issue, focused in this subject if we want to discuss it further. π So given that's not a big need from my end, and if you don't also have that need, I would only consider if I got a very strong need/ask for a nested structure, IMHO.
PS: A thing that I feel the need atm, actually, is being able to customize the TOC that's generated further, as in, where to place it - in my example I add a cover page, a blank page, a book title page, a publishing info page, and only after these, the TOC. I kinda omitted the TOC on my custom OPF, and generated a new one manually and added it as regular content, but then validation bitches about having an .xhtml
file that's not declared on the OPF. But regarding that I'll think about it, submit a PR or open an issue.
Cheers @cyrilis! π
from epub-gen.
Ok, just noticed that I can achieve what I need with some wicked customization of templates.
I'll somehow add a property to options
, like tocIndex
(glad templates have access to the options
local/object), and insert the TOC at a given index on spine/NCX, etc, therefore I can have a cover+blank+title+publishing info page before the TOC.
Might work. Although I'm willing to discuss further improvements to it if anyone is interested. π
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
- a couple of bugs when using epub-gen 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.