Alex Rivera | Logout

sphinx import parent dir rst file?

Asked 2010-12-29T00:35:01.783
11

I need to create one sphinx project for each module,

and each module share some common rsts, like company info, license, etc.

My project tree is like this:

./conf.py
./index.rst
./intro.rst
./about.rst

./device1/conf.py
./device1/index.rst 

I write this in ./device1/index.rst, and it is not worked, how could I import parent rst files?

.. toctree::
   :maxdepth: 1

   ../intro
   ../about
Edit
Report

1 Answer

11

I found a way to do this:

.. include:: ../intro.rst

but it will include all the texts... maybe it is the only way?

answered 2011-01-04T01:59:12.603

Your Answer