How can I exclude a Github folder from my documentation website?

17 views
Skip to first unread message

Jim Kennedy

unread,
May 13, 2022, 9:59:42 AMMay 13
to sphinx-users
Using sphinx_rdt_theme from Read the Docs I have a company-private repo structure that looks something like this:

docu/source/
- lorem/
- ipsum/
- dolor/

Let's say that the content in the ipsum/ folder isn't ready for publication yet and the team are still working on it. 

So I want to push a build to the customer-facing website with an html structure that looks something like this:

docu/source/
- lorem
- dolor

The navigation and linkages to ipsum/ etc. I can eliminate easily but I want to prevent the ipsum folder and files from being published, as someone will eventually find them. How can I do that?

Carl Gay

unread,
May 15, 2022, 10:05:44 PMMay 15
to sphinx-users
It sounds like the exclude_patterns config option should work for your use case, but...be sure not to make the mistake I made, here: https://groups.google.com/g/sphinx-users/c/M7Slj3ajYjU/m/T-PDdmqmBgAJ 

exclude_patterns = ['**/ipsum']

Jim Kennedy

unread,
May 16, 2022, 9:38:42 AMMay 16
to sphinx-users
Thanks Carl! This worked for me straight out of the box, once I spotted the already existing empty exclude_patterns you mentioned..

Jim.

Reply all
Reply to author
Forward
0 new messages