Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't display multiple .md files in .rst toctree Sphinx

I can render my Readme.md files in Sphinx using recommonmark. But when I try to put in multiple Readme files in a .rst file toctree only the first one can be accessed from the documentation link.

Kick! KVM
=========

Source Code: https://bitbucket-eng-rtp1.cisco.com/bitbucket/projects/KICK/repos/kickdb/browse/kick/kvm


ReadMe
------
.. toctree::
    :maxdepth: 2

    ./README.md

Tests ReadMe
------------
.. toctree::
    :maxdepth: 2

    ./tests/README.md


KVM Module Code
---------------

.. automodule:: kick.kvm.actions
    :members:
    :undoc-members:

I can see the both the Readme files in the folder structure, but the links don't work when trying to access them from the rendered html page.

Here is an image for the folder structure.

Any help appreciated, Thanks!

Here is the error that pops up in the Sphinx build -

/workspace/kick_device2/kick/kvm/kvm.rst:16: WARNING: toctree contains reference to document 'kick/kvm/tests/README' that doesn't have a title: no link will be generated

like image 420
Strommer Avatar asked Aug 31 '17 17:08

Strommer


1 Answers

The warning indicates you need to add a title to the file tests/README.md. Sphinx considers the h1 level to be the title of a page. From the markdown syntax documentation:

# My Title

or

My Title
========
like image 175
Steve Piercy Avatar answered Nov 06 '22 00:11

Steve Piercy