Holzhaus / sphinx-multiversion

Sphinx extension for building self-hosted versioned docs.
https://holzhaus.github.io/sphinx-multiversion/
BSD 2-Clause "Simplified" License
148 stars 65 forks source link

Add smv_build_targets option to configure multiple build targets #74

Open samuel-emrys opened 3 years ago

samuel-emrys commented 3 years ago

I thought it would be useful to be able to bring functionality closer to what readthedocs offers in terms of downloadable documentation for each version documentation is produced for. The smv_build_targets configuration option will allow a user to specify the formats in which the documentation should be provided for download, along with more granular control of the sphinx builder used to generate this documentation.

This PR also introduces the smv_clean_intermediate_files configuration option, which allows a user to have control over whether the intermediate build directories are removed after building the documentation. This defaults to True, however this would allow users who wish to manipulate build files with another program/script to do so if required.

Review and any comments/suggestions welcome.

Closes #70.

samuel-emrys commented 3 years ago

I've noticed that the Travis CI tests you have set up are for Python 3.6 and 3.7. I've utilised the shutil.copytree method in my implementation, which only obtained the functionality required in Python 3.8. For backwards compatibility, I've included a modified version of the source code of shutil.py in a subpackage, lib. If this backwards compatibility isn't required, lib/shutil.py can be removed in favour of the version that ships with python 3.8. The specific requirement is the dir_exists_ok attribute required to overwrite directories if they already exist.

samuel-emrys commented 2 years ago

@Holzhaus is there anything I can do to get this merged in?

numero-744 commented 1 year ago

Hello,

@samuel-emrys Thanks for the PR, I find the feature really useful and easy to use. I have tested it and I found one issue, I'm sending a review to the PR.

@Holzhaus or other manager of this repository, please can you review and merge this PR?