mdBook
mdBook copied to clipboard
"Book Layout" for Print Mode to read offline in its original format
Problem
Currently, if you wish to read the book offline, you must click on print mode and Ctrl+S the website as one page. However, having everything in one long page is hard to track, not to mention that the table indices don't work.
Since there is already a "print mode" in which the user explicitly expresses the intent to fetch the entire documentation at once, it would be nice if print mode can also export a layout that saves it in the pagelink-separated format so that the table of contents works properly. Basically it lets you save the entire documentation at once, but instead of one long page it's more like the original website structure.
Proposed Solution
Add an option to allow print mode to also save as pagelinked website format.
Notes
No response
Perhaps I'm not understanding the suggestion here, but if this asking for the ability to read a book as-is offline, then that is currently tracked in #546. Does that cover what you are asking?
Kind of but not quite. That issue is asking for the ability to cache the website. This one is asking for the ability to download the website instead, via an alternate print mode. The difference being that the downloaded form is something which the user can interact with in their file system, whereas cached is just a temporary browser storage.
is this really that difficult? I was under the impression that 90s webcrawlers had been able to do this on static sites since forever, it would be nice to have a one-click solution that can be offered by the first-party who does wants to make their book exportable in html without needing to host a separate zip
At least, I thought this would be much simpler than some convoluted service worker offline caching feature. Not saying that this should replace that proposal, but it serves a different usecase between temporarily caching vs exporting an html snapshot, between the two I think the latter is pretty open-and-shut compared to the former which requireb careful consideration for the "right" way to do it.
I think being able to install the book as a pwa is better solution for following reasons
- The book gets updates if the pages are updated - wont be so in case a print option is used to store the pages into folders.
- pwa is a standard solution that is device/OS independent . A web technology .
- loading pages from cache may be faster for general experience.
- pwa is kinda becoming standard. Readers can see the
icon in the url bar . No extra training needed.