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

Register callback to run sphinx-apidoc on every branch/tag? #68

Open fritz-hh opened 3 years ago

fritz-hh commented 3 years ago

Hi. Thanks for your great work on sphinx-multiversion. I have a API documentation generated using sphinx-apidoc and sphinx-build. I would like to generate a versioned api documentation using sphinx-multiversion in a CI environment with Jenkins. If possible, I would like to avoid committing/pushing the output of sphinx-apidoc onto the respective branch.

My question is the following: is it possible to tell sphinx-multiversion to run sphinx-apidoc after sphinx-multiversion has checked-out the respective branch, so that sphinx-multiversion can use the rst files generated by sphinx-apidoc. Thanks in advance for your help.

fritz-hh commented 3 years ago

PR #62 may solve this issue

dflock commented 2 years ago

You can use this to get this working: https://pypi.org/project/sphinxcontrib-apidoc/ - it automatically runs the configured apidoc stuff on any sphinx build, including each version build.

joe-agent commented 1 year ago

Can anyone guide me how to use sphinx-multiversion with sphinx-apidoc

Currently I use the commands below with sphinx-apidoc, but I do not know how to link sphinx-multiversion:

sphinx-apidoc -F --implicit-namespaces -P -o ./doc ./<namespace> ./setup.py
./doc/make.bat clean
./doc/make.bat html

@fritz-hh , any advice?