Tim
Tim

Reputation: 1023

separate sphinx build and source directories for version control

I have a working directory containing my project and it is in a version control system. I'd like to create a doc directory inside my project that contains only restructured text files for sphinx.

That is, I don't want sphinx to build html files inside my project, but put them outside so they don't get put into version control.

Upvotes: 9

Views: 6912

Answers (1)

Thomas Fenzl
Thomas Fenzl

Reputation: 4392

So if you question is 'How can I build documentation outside of the source tree', the documentation helps:

sphinx-build -b html sourcedir builddir

Just point builddir to a location outside of your source tree.

Or, depending on your version control system, add the directory you generate your documentation to an 'ignore file' (e.g. .gitignore, .hgignore, ...)

Upvotes: 7

Related Questions