Skip to content

Used readthedocs URL for htmlzip doc build #2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bmispelon
Copy link
Member

@bmispelon bmispelon commented Apr 14, 2025

We were already serving the PDF and ePub formats from ReadTheDocs, and they also build the HTML+zip format.

Not having to build the HTML+zip documentation would help cut down on the time it takes to build the regular (HTML) version of the docs.

@adamzap
Copy link
Member

adamzap commented Apr 14, 2025

The new ZIP file puts all of the documentation into a single 17.5MB file called contents.html. Is that intentional? It's different from the way that the contents of the ZIP file is usually structured.

@bmispelon bmispelon force-pushed the docs-htmlzip-readthedocs branch from 3d32677 to 559fb70 Compare April 14, 2025 20:33
@bmispelon
Copy link
Member Author

The new ZIP file puts all of the documentation into a single 17.5MB file called contents.html. Is that intentional? It's different from the way that the contents of the ZIP file is usually structured.

That's not intentional at all, great catch! I had assumed (without checking) that RTD's htmlzip builder was the same thing we were already doing, but that's indeed not the case.

That's probably a blocker for this PR to be merged. I'm not sure who uses the HTML build of the documentation, but they probably wouldn't be too happy with a single giant HTML file 😅
I tried to see if this was configurable in RTD but it seems the singlehtml builder is hardcoded: https://github.com/readthedocs/readthedocs.org/blob/4e34bdfed7e3e1eb26cfa6bf6a5b89d0fc0816a6/readthedocs/doc_builder/backends/sphinx.py#L202

@adamzap
Copy link
Member

adamzap commented Apr 14, 2025

Ah, that's unfortunate!

@bmispelon
Copy link
Member Author

I've opened a feature request on RTD for now: readthedocs/readthedocs.org#12108

@adamzap
Copy link
Member

adamzap commented Apr 14, 2025

Great, upvoted!

@smithdc1
Copy link
Member

they also build the HTML+zip format

But only in English? Currently, the downloadable html docs are available in all languages?

@bmispelon
Copy link
Member Author

they also build the HTML+zip format

But only in English? Currently, the downloadable html docs are available in all languages?

Ah, that's another excellent point. Currently the PDF and ePub served by readthedocs are always in English (even when you're viewing the documentation in another language), but I'd indeed missed the fact that our custom-made HTML+zip is translated.

That's another big blocker for this PR and one that might be quite hard to fix 🤔

@pauloxnet
Copy link
Member

Since there are various blockers for this PR I added the tag onhold.

At this point we can close it and move the discussion to an issue.

@smithdc1
Copy link
Member

It seems that RTD could do this, but it would require a RTD project for each language.

One additional benefit of doing that would mean that pdf and epub could be provided for translated versions.

https://me-readthedocs.readthedocs.io/en/latest/localization.html

@pauloxnet
Copy link
Member

It seems that RTD could do this, but it would require a RTD project for each language.

One additional benefit of doing that would mean that pdf and epub could be provided for translated versions.

https://me-readthedocs.readthedocs.io/en/latest/localization.html

This seems a big improvement. We can serve all formats in all supported languages. :-)

@bmispelon
Copy link
Member Author

At this point we can close it and move the discussion to an issue.

I agree that it doesn't make much sense to keep this PR open. It's a much more substantial change than I'd originally foreseen. I also don't think this is an issue that can be fixed just on our end, as it will require some fundamental changes to the way the multi-language docs are built. It might be more appropriate to file something on https://github.com/django/django-docs-translations

@bmispelon bmispelon closed this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants