sphinx import parent dir rst file?

后端 未结 2 624
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-20 14:38

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:

相关标签:
2条回答
  • 2021-02-20 15:03

    I personally couldn't figure out how to modify the source search path, so I ended up modifying the make file to create symlinks for all *.rst files in the sphinx build directory.

    foreach f ( `\ls OTHER_DIR | egrep '.rst$$'` ) \
        ln -s -f $$f BUILD_DIR \
    end
    

    (This presumes you're using Linux/Unix.)

    0 讨论(0)
  • 2021-02-20 15:15

    I found a way to do this:

    .. include:: ../intro.rst
    

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

    0 讨论(0)
提交回复
热议问题