retype
retype copied to clipboard
Single HTML file of a book
Discussed in https://github.com/retypeapp/retype/discussions/84
Originally posted by larmarange July 21, 2021 Do you have any plan for allowing to generate (in addition of the website) an HTML file (ideally self-contained) containing all the book allowing to propose to readers to download the overall book and/or to print it as a PDF with their browser.
Yes, 100% this is happening. I've had on my TODO list since the beginning of Retype.
We will be providing several print friendly, file download, and eBook download options. This will include:
- Print friendly stylesheet, so printing any individual page directly from the browser looks awesome
- A per page .pdf download option
- An entire content (the "Book") in at least several different formats:
- .epub (all content)
- .ibooks (might not be required)
- .pdf (per page & all book)
- .html (might not be required)
We haven't started on any of these features yet, but they are technically trivial for us to implement. Most of the development time will be taken up with UI design and testing.
I'm not exactly sure what release the above (or some of the above) features will be implemented, but it is a priority.
We're a small team and working our way through all the feature requests as fast as we can. That said, all of the above will supported by Retype.
Hope this helps answer your questions.
Yes thanks. That would be great
Any updates on this issue? I'm really looking forward for an option to build the documentation as a single pdf file.
Looking forward to this, too. Does anyone see a "hacked" (pandoc?) way of getting something out, even if not perfect?
Does anyone see a "hacked" (pandoc?) way of getting something out, even if not perfect?
There should be a relative easy way to hack something up.
- A script that iterates over the files, and removes or modifies all non-standard markdown elements
- Then, it concatenates the output to a single markdown file
- Then, you can just preview it with any markdown previewer - personally, I am using my own CLI to preview READMEs (madman and save the HTML, or use any other "markdown to HTML" conversion technique.
The bigger challenge, would be to convert the non standard markdown elements.
Another similar approach, would be to
- Write a script that iterates and concats all your markdown files, and saves the output back to the source folder
- Open the result in Retype... :)
@geoffreymcgill No PDF support is preventing me from using Retype
Any updates on PDF support? This is really the missing thing here!
Converting individual markdown files into one cohesive PDF book is not a trivial task.
From dev perspective, it involves two tasks:
Task 1: Concatenating markdowns, which will require:
- Having a new template that understands "pages", has a Table of Contents and other elements in preparation for PDF export.
- Being able to adjust all links to be internal
- Being able to adjust all header links, to distinguish from one another.
- More
Task 2: Converting markdown to HTML and then to PDF
While it can be done in a server environment (one that render server-side markdown to HTML), it is - to my knowledge - quite impossible to do on a client side, without bringing in bloated software to do so.
Personally, I do not know of any other documentation tool generator that does that - I would love to be enlightened if there is any.
I believe the only course of action for Retype developers (if any) is to render a special HTML page (say "my-retype-site.com/book"), which will create the HTML render of everything (i.e. Task 1), and then the user can use their already available "Download as PDF" in Chrome or other modern browser.
Im well aware that this is not trivial, it's a really important feature nevertheless in my eyes.
Personally, I do not know of any other documentation tool generator that does that - I would love to be enlightened if there is any.
Gitbook does that. See Gitbook Docs – PDF Export
I understand. But Gitbook is a hosted service, retype is a static site generator.
Print friendly stylesheet, so printing any individual page directly from the browser looks awesome
A per page .pdf download option
An entire content (the "Book") in at least several different formats:
- .epub (all content)
- .ibooks (might not be required)
- .pdf (per page & all book)
- .html (might not be required)
I understand the additional complexity involved in # 3 (entire "book"), but the first two points seem much more trivial. Since Retype doesn't currently support at-rules @page { @top-right {...}} it's damn near impossible to get a nice printout of a single article.
Any updates on this @geoffreymcgill?
@p0fi Nice. Thanks for that.
Just an FYI. Refer to #628 for a somewhat "hacky" workaround that can be used as an interim measure for single page pdfs.