jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Export a single HTML file with all assets included

Open choldgraf opened this issue 4 years ago • 3 comments

In many cases, people want to share a single self-contained HTML file with others that "just works". This isn't currently possible because our HTML builds a collection of HTML assets, not just a single file. It would be great to support an "everything in one file" output as well.

In https://github.com/executablebooks/meta/discussions/162#discussioncomment-95542 @mmcky and @akhmerov mentioned that we might be able to accomplish this with a combination of:

  1. The singlehtml builder in Sphinx (https://www.sphinx-doc.org/en/master/man/sphinx-build.html#options)
  2. A package that embeds assets in a single HTML file, like this one: https://github.com/jonathantneal/posthtml-inline-assets

choldgraf avatar Oct 12 '20 21:10 choldgraf

Sphinx has its own feature and that is making it very complicated. Good to have any simple solution for it.

Khushbu04in avatar Oct 27 '20 10:10 Khushbu04in

This would be a great addition! In my use case, I want to generate large configurable reports with jupyter-book, but the idea of storing and sharing a bunch of files isn't very appealing. I tried merging the results using webpage2html (python3 port) and although it worked, the format was somewhat broken and it didn't combined the different html pages (only the initial target - intro.html). I tried another few options but the endeavor was a bit frustrating.

davibicudo avatar Jul 01 '21 09:07 davibicudo

Seconding that this would be a fantastic feature for me!

Use case for clarity: Audit firm that requires 'static' versions of documentary evidence. Analysis being performed in Jupyter and formatted for a non-technical audience using Jupyter Book. Regulatory requirements prevent hosting as a good solution.

Stuart-Cobbe avatar Jul 20 '22 15:07 Stuart-Cobbe

Perhaps this might interest you: https://github.com/AdrianVollmer/Zundler

AdrianVollmer avatar Oct 12 '22 16:10 AdrianVollmer