Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sphinx: specify html path distinct from BUILDDIR/html?

In the sphinx Makefile, let's say I specify:

BUILDDIR = buildy_mcbuildface

So that make html creates the documentation webpage under buildy_mcbuildface/html. This is a slight annoyance in that the contents of the html folder must be copied to the server location after each build.

Can I specify the html path directly, or is it always built under $BUILDDIR/html? I have looked at the html options, and I see no such path option.

like image 279
Matt Hancock Avatar asked May 02 '26 13:05

Matt Hancock


1 Answers

Here's the solution I came up with:

Add to the Makefile:

HTMLCOPYDIR = /path/to/server/location

and also in the Makefile change, add:

cp -rT $(BUILDDIR)/html $(HTMLCOPYDIR)

after the line:

@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
like image 74
Matt Hancock Avatar answered May 05 '26 06:05

Matt Hancock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!