Maintain Project directory structure in build directory

10 views
Skip to first unread message

Joshua Sullivan

unread,
May 13, 2019, 5:56:19 PM5/13/19
to sphinx-users
I would like to maintain my project directory structure with autodoc, but I can't seem to find the configuration options to do so. Basically I have my project and I have chosen not to create seperate build and source directories. Under my main project directory, I have a bunch of subdirectories and python files. When I use autodoc with sphinx it is currently creating a seperate HTML file for every single file like it should, but it is placing the file individually within the build folder instead of maintaining a similar directory structure to the one my project has. 

I would like my build folder and in turn my HTML index page to look like the following:
  • Project name
    • folder 1
      • folder one
        • file 1
        • file 2
      • folder two
        • file 1
        • file 2
      • file 1
      • file 2
    • Folder 2
    • ...
Where as currently it looks like:
  • Project name
    • file 1
    • file 2
    • file 1
    • file 2
    • file 1 
    • file 2
How can I make it so that it maintains my project directory structure within my build folder as well as on the HTML page so that I can easily find the files I am looking for?

Any help would be greatly appreciated!! 

Thanks

Joshua Sullivan (Verb Ext.)

unread,
May 14, 2019, 11:26:05 AM5/14/19
to sphinx-users
Nevermind, I found my issue. I was missing __init__.py files in my subdirectories. I had previously added these on a different branch I was working on that wasn't merged yet instead of adding them to the current branch I was working on. Thanks anyways!
Reply all
Reply to author
Forward
0 new messages