diff --git a/doc/source/_static/css/custom.css b/doc/source/_static/css/custom.css index f2f4c6500ffa..2ac45d4e9a56 100644 --- a/doc/source/_static/css/custom.css +++ b/doc/source/_static/css/custom.css @@ -393,8 +393,8 @@ table.autosummary tr > td:first-child > p > a > code > span { /* Prevent the the PyData theme Version Switcher from getting too large */ .version-switcher__menu { - max-height: 496px; - overflow: scroll; + max-height: 40rem; + overflow-y: scroll; } /* Hide the RTD version switcher since we are using PyData theme one */ diff --git a/doc/source/custom_directives.py b/doc/source/custom_directives.py index 55e899ebd943..09ec5c116261 100644 --- a/doc/source/custom_directives.py +++ b/doc/source/custom_directives.py @@ -1256,14 +1256,6 @@ def pregenerate_example_rsts( ) -ray_prefix = "ray-" -min_version = "1.11.0" -repo_url = "https://github.com/ray-project/ray.git" -static_dir_name = "_static" -version_json_filename = "versions.json" -dereference_suffix = "^{}" - - def generate_version_url(version): return f"https://docs.ray.io/en/{version}/" @@ -1273,6 +1265,13 @@ def generate_versions_json(): and generates the JSON needed for the version switcher """ + ray_prefix = "ray-" + min_version = "1.11.0" + repo_url = "https://github.com/ray-project/ray.git" + static_dir_name = "_static" + version_json_filename = "versions.json" + dereference_suffix = "^{}" + version_json_data = [] # Versions that should always appear at the top