use file from outside of index.rst root

24 views
Skip to first unread message

Ádám Ticz

unread,
Sep 21, 2021, 7:27:07 AM9/21/21
to sphinx-users
Hello there,

I am kind of new to the topic of sphinx and reStrucuredText, so please bear with me. :)
My git repo looks like the following:
  • source code folder
    • boot.py
    • main.py
    • lib folder for other .py files
  • docs folder (standard spinx stuff)
    • build 
    • source
    • make 
What I want to do is to place comments into the boot, main and to the files inside lib folder, and somehow convince sphinx to find these comments.

What I achived so far is the following:
- I have nice index.rst file where I explain what is the project is all about
- a begin.rst file where I describe how to set up the development enviromet

I think the rest of the documents belongs into the code itself. So i think I want to do something like this:
".. toctree::
   :maxdepth: 2
   :caption: source code:
   
   ../../boot.py"

But I can't do that. (Actuall can, but doesnt have any result beside an error)
Is there a way to achive this result? Or I am just "holding it a wrong way"?

Thank you,
Ádám Ticz
Reply all
Reply to author
Forward
0 new messages