sphinx-doc/sphinx

Allow `singlehtml` to embed all assets into a single html file

Open

#10.688 geöffnet am 21. Juli 2022

Auf GitHub ansehen
 (7 Kommentare) (24 Reaktionen) (0 zugewiesene Personen)Python (1.985 Forks)batch import
builder:htmlhelp wantedtype:enhancement

Repository-Metriken

Stars
 (5.625 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 11h) (11 gemergte PRs in 30 T)

Beschreibung

Context

The singlehtml builder is a way to combine all pages of the HTML documentation into a single HTML file. This is really useful if you want to quickly share your documentation with other people in a way that they can quickly open in their computer.

However, one challenge is that singlehtml builds also tend to come with a lot of external assets in the local filesystem. For example, CSS files, JS files, etc are packaged alongside the single HTML file. This makes the benefits of "a single HTML file" less powerful, because now you have a collection of files that you need to ship together. It is much more difficult to, for example, attach them to emails and such.

Suggestion

Make it possible (or document how if it is already possible) to make singlehtml builds also include the asset content inside of the HTML file, so that it is a single, self-contained file that can be easily sent to somebody else, and can open anywhere without any external files (at least, local ones).

References

Some folks have also requested this in the Jupyter Book project here:

Contributor Guide