Skip to content

Conversation

@acul71
Copy link
Contributor

@acul71 acul71 commented Dec 18, 2025

This PR fixes the "No HTML content found" error by switching from build.commands to build.jobs.pre_build.

Problem:
Using build.commands completely overrides the build process, preventing Sphinx from generating HTML output to $READTHEDOCS_OUTPUT/html/.

Solution:
Use build.jobs.pre_build to extend the build process instead of overriding it. This allows:

  • API docs to be generated before the build
  • Default Sphinx build process to run and output HTML correctly

Related: Fixes issue #31

Reference: https://docs.readthedocs.io/page/build-customization.html#where-to-put-files

Sphinx is already installed via the dev extra requirements, so the
explicit pip install is unnecessary. The key fix is using
python -m sphinx.ext.apidoc instead of sphinx-apidoc command.
Using build.commands completely overrides the build process, preventing
Sphinx from generating HTML output. Switch to build.jobs.pre_build to
extend the build process while keeping the default Sphinx build.
@acul71 acul71 force-pushed the fix-readthedocs-build branch from 63803c5 to d67451c Compare December 18, 2025 01:48
@acul71 acul71 merged commit 9a37ffc into master Dec 18, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants