[3381085] Improved way of detecting what version of the documentation to build.
Set the HTML_VERSION environment variable to override the (sensible) default.