Quandela / Perceval

An open source framework for programming photonic quantum computers
https://perceval.quandela.net
Other
133 stars 63 forks source link

[docs] sphinx multiversion #340

Closed Quandevla closed 3 months ago

Quandevla commented 6 months ago

Notes

You can remove tags we don't want with the regex smv_tag_whitelist like

smv_tag_whitelist = r'^(?!(v0\.9\.3)|(v0\.9\.1))v\d+\.\d+\.\d+$'

To test which version sphinx is goinf to build you can do

cd docs && python -m sphinx_multiversion --dump-metadata source build/html
Quandevla commented 6 months ago

To test this PR you can do

cd docs
make multiversion
cd build/html
python -m http.server
# go to webpage
Quandevla commented 6 months ago

Note that we also can deploy the docs to github page with github actions ;)

Quandevla commented 6 months ago

I fix I have fixed the problem with redirection.

As explained, we can withelist versions (and kinda blacklist them)

smv_tag_whitelist = r'^(?!(v0\.9\.3)|(v0\.9\.1))v\d+\.\d+\.\d+$'

Concerning the size, I think 50% of the generated docs are doctree files which are not useful for HTML (if I'm correct)

I also think that if you want to build the docs locally, we can use the make html

The make multiversion would be used only for automatic docs deployement with pipelines