Search code examples
python-sphinxread-the-docs

readthedocs not generating index page properly


Index.rst files look like this.

Modules
==========

Contents:

.. toctree::
   :maxdepth: 1

   ping
   rpc

I have ping.rst and rpc.rst in same directory as index.rst. The html pages for ping and rpc are being created properly but index,html doesn't have proper data.

The problem seems with this

docs/rpc.rst: WARNING: document isn't included in any toctree
docs/ping.rst: WARNING: document isn't included in any toctree

I checked and the generated folder _build/html/_sources/ has unexpected behaviour. The rpc.rst.txt and ping.rst.txt are same as rpc.rst and ping.rst but index.rst.txt is blank.

On using -vvvvv for sphinx command, found the below output.

writing output... [ 33%] index
[app] emitting event: 'doctree-resolved'(<document: >, 'index')
[app] emitting event: 'html-page-context'('index', 'page.html', {'file_suffix': '.html', 'style': 'bootstrap-sphinx.css', 'master_doc': 'inde
writing output... [ 50%] ping
[app] emitting event: 'doctree-resolved'(<document: <target...><section "ping"...>>, 'ping')
[app] emitting event: 'html-page-context'('ping', 'page.html', {'file_suffix': '.html', 'style': 'bootstrap-sphinx.css', 'master_doc': 'index

What am I missing?


Solution

  • Remove the call to nsible2rst.main(). It appears this call overwrites other automation.