How does OpenCV implement the Version Switcher in its Documentation?

Hello, OpenCV Team.

I noticed that there is a version switcher provided in OpenCV: OpenCV modules, so that we can switch to the corresponding pages in different versions conveniently.

If possible, can someone explain its implementation? (Take CMake for example, https://discourse.cmake.org/t/doc-versioning-mechanism/4814/3)

Thanks.

unfortunately, cmake / doxygen can only build local docs from
exactly the code version you checked out from github, one at a time.

so, however they populate this box (no idea), it wont work without a large cache of previous doc versions on disk