Q:

Why can't I add contents in Sphinx

When I use Sphinx to document my program, I can't add content. It just raises this exception:
invalid option block.

Here's my markup:
.. toctree::
   :maxdepth: 2
   code
   requirment

what's the problem?

A:

it does not look tile a comment problem. Try to put a blank line in this piece of code to look like this:
.. toctree::
   :maxdepth: 2

   code
   requirment

