Skip to content

Work around design feature of Sphinx that puts its files in a different...

dirhtml - puts the generated code right in the build directory $BUILDDIR html - puts the generated code in the html subdirectory, $BUILDDIR/html

dirhtml builds cannot be viewed without a good webserver because they do not include the index.html in
the URL links (because they think it is ugly) They rely on the webserver automatically converting a
../directory/ link to ../directory/index.html. A browser viewer directly on the files does not due this
automatic conversion, nor does the view app in the GitLab CI, thus links do not work and it is impossible
to review the generated website.

The PETSc builder of the source code put the src in $BUILDDIR and used relative links to the source from
the Sphinx files to point to them. This does not work with the Sphinx html build because the relative
paths are wrong.

This MR fixes the problem by putting the src in the $BUILDDIR/html when using the Sphinx html so that the
same relative links work in all the cases

The exact differences (like the directory locations) in the different Sphinx build modes are not well documented
and the actual code that puts the results in the different directories is very well hidden making it
difficult to decipher how the problem discusses occurs and a reasonable way to resolve the problem

Commit-type: documentation, build, bug-fix, portability-fix
/spend 1h
and a lot of cursing

Merge request reports