Skip to content

Conversation

@acul71
Copy link
Contributor

@acul71 acul71 commented Dec 18, 2025

Fixes Read the Docs build failure reported in build #30752702.

Problem

Read the Docs build was failing with:

/home/docs/checkouts/readthedocs.org/user_builds/py-cid/checkouts/latest/docs/index.rst:11: WARNING: toctree contains reference to nonexisting document 'cid' [toc.not_readable]

The build failed because cid.rst wasn't generated before Sphinx tried to process it.

Solution

  • Add build command to .readthedocs.yml to run sphinx-apidoc before Sphinx processes the documentation
  • Use -f flag to force overwrite existing files
  • This ensures Read the Docs generates the API documentation files before Sphinx tries to build them

Changes

  • Added build.commands section to .readthedocs.yml
  • Command: sphinx-apidoc -o docs/ --separate --no-toc -f cid

This matches the local build process in the Makefile and ensures Read the Docs can successfully build the documentation.

- Add build command to run sphinx-apidoc before Sphinx processes docs
- Use -f flag to force overwrite existing files
- Fixes warning: 'toctree contains reference to nonexisting document cid'

This ensures Read the Docs generates the API documentation files
before Sphinx tries to build them, matching the local build process.
@acul71 acul71 merged commit 6631974 into master Dec 18, 2025
24 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