[Docs] Speed up docs build ~5x (#58705)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Harry Mellor committed Sep 29, 2026 at 12:16 UTC 998490cd9f297381288eb631bc98a4dfe1304f57
4 files changed +63 -48
docs/mkdocs/overrides/partials/nav.html new
+34
@@ -0,0 +1,34 @@
1 +<!-- Material nav.html (https://github.com/squidfunk/mkdocs-material/blob/9.7.7/material/templates/partials/nav.html) with navigation.prune applied to the API reference only -->
2 +{% import "partials/nav-item.html" as item with context %}
3 +{% set features = features + ["navigation.prune"] %}
4 +{% import "partials/nav-item.html" as pruned_item with context %}
5 +{% set class = "md-nav md-nav--primary" %}
6 +{% if "navigation.tabs" in features %}
7 + {% set class = class ~ " md-nav--lifted" %}
8 +{% endif %}
9 +{% if "toc.integrate" in features %}
10 + {% set class = class ~ " md-nav--integrated" %}
11 +{% endif %}
12 +<nav class="{{ class }}" aria-label="{{ lang.t('nav') }}" data-md-level="0">
13 + <label class="md-nav__title" for="__drawer">
14 + <a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
15 + {% include "partials/logo.html" %}
16 + </a>
17 + {{ config.site_name }}
18 + </label>
19 + {% if config.repo_url %}
20 + <div class="md-nav__source">
21 + {% include "partials/source.html" %}
22 + </div>
23 + {% endif %}
24 + <ul class="md-nav__list" data-md-scrollfix>
25 + {% for nav_item in nav.items %}
26 + {% set path = "__nav_" ~ loop.index %}
27 + {% if nav_item.children and (nav_item.children | first).url == "api/" %}
28 + {{ pruned_item.render(nav_item, path, 1) }}
29 + {% else %}
30 + {{ item.render(nav_item, path, 1) }}
31 + {% endif %}
32 + {% endfor %}
33 + </ul>
34 +</nav>
mkdocs.yaml
-10
@@ -65,13 +65,6 @@ plugins:
65 - awesome-nav
66 - glightbox
67 - git-revision-date-localized
68 - - minify:
69 - minify_html: true
70 - minify_js: true
71 - minify_css: true
72 - cache_safe: true
73 - js_files: [docs/mkdocs/javascript/*.js]
74 - css_files: [docs/mkdocs/stylesheets/*.css]
68 # For API reference generation
69 - api-autonav:
70 modules: ["vllm"]
@@ -98,9 +91,6 @@ plugins:
91 summary: true
92 inventories:
93 - https://docs.python.org/3/objects.inv
101 - - https://typing-extensions.readthedocs.io/en/latest/objects.inv
102 - - https://docs.aiohttp.org/en/stable/objects.inv
103 - - https://pillow.readthedocs.io/en/stable/objects.inv
94 - https://numpy.org/doc/stable/objects.inv
95 - https://pytorch.org/docs/stable/objects.inv
96 - redirects:
requirements/docs.in
-1
@@ -6,7 +6,6 @@ mkdocs-gen-files
6 mkdocs-awesome-nav
7 mkdocs-glightbox
8 mkdocs-git-revision-date-localized-plugin
9 -mkdocs-minify-plugin
9 mkdocs-redirects
10 regex
11 ruff
requirements/docs.txt
+29 -37
@@ -1,40 +1,36 @@
1 # This file was autogenerated by uv via the following command:
2 # uv pip compile requirements/docs.in -o requirements/docs.txt --python-platform x86_64-manylinux_2_28 --python-version 3.12
3 -annotated-types==0.7.0
3 +annotated-types==0.8.0
4 # via pydantic
5 babel==2.18.0
6 # via
7 # mkdocs-git-revision-date-localized-plugin
8 # mkdocs-material
9 -backrefs==7.0
9 +backrefs==8.0
10 # via mkdocs-material
11 -bracex==2.6
11 +bracex==3.0.1
12 # via wcmatch
13 -certifi==2026.4.22
13 +certifi==2026.7.22
14 # via requests
15 -charset-normalizer==3.4.7
15 +charset-normalizer==3.5.1
16 # via requests
17 -click==8.3.3
17 +click==8.5.0
18 # via
19 # mkdocs
20 # properdocs
21 colorama==0.4.6
22 # via mkdocs-material
23 -csscompressor==0.9.5
24 - # via mkdocs-minify-plugin
23 ghp-import==2.1.0
24 # via
25 # mkdocs
26 # properdocs
27 gitdb==4.0.12
28 # via gitpython
31 -gitpython==3.1.50
29 +gitpython==3.1.62
30 # via mkdocs-git-revision-date-localized-plugin
33 -griffelib==2.0.2
31 +griffelib==2.3.0
32 # via mkdocstrings-python
35 -htmlmin2==0.1.13
36 - # via mkdocs-minify-plugin
37 -idna==3.13
33 +idna==3.20
34 # via requests
35 jinja2==3.1.6
36 # via
@@ -42,9 +38,7 @@ jinja2==3.1.6
38 # mkdocs-material
39 # mkdocstrings
40 # properdocs
45 -jsmin==3.0.1
46 - # via mkdocs-minify-plugin
47 -markdown==3.10.2
41 +markdown==3.10.3
42 # via
43 # mkdocs
44 # mkdocs-autorefs
@@ -72,7 +66,6 @@ mkdocs==1.6.1
66 # mkdocs-gen-files
67 # mkdocs-git-revision-date-localized-plugin
68 # mkdocs-material
75 - # mkdocs-minify-plugin
69 # mkdocs-redirects
70 # mkdocstrings
71 mkdocs-api-autonav==0.4.0
@@ -87,21 +80,19 @@ mkdocs-gen-files==0.6.1
80 # via -r requirements/docs.in
81 mkdocs-get-deps==0.2.2
82 # via mkdocs
90 -mkdocs-git-revision-date-localized-plugin==1.5.1
83 +mkdocs-git-revision-date-localized-plugin==1.6.0
84 # via -r requirements/docs.in
85 mkdocs-glightbox==0.5.2
86 # via -r requirements/docs.in
94 -mkdocs-material==9.7.6
87 +mkdocs-material==9.7.7
88 # via -r requirements/docs.in
89 mkdocs-material-extensions==1.3.1
90 # via mkdocs-material
98 -mkdocs-minify-plugin==0.8.0
99 - # via -r requirements/docs.in
91 mkdocs-redirects==1.2.3
92 # via -r requirements/docs.in
102 -mkdocstrings==1.0.4
93 +mkdocstrings==1.0.6
94 # via mkdocstrings-python
104 -mkdocstrings-python==2.0.3
95 +mkdocstrings-python==2.0.8
96 # via
97 # -r requirements/docs.in
98 # mkdocs-api-autonav
@@ -109,9 +100,10 @@ msgspec==0.21.1
100 # via -r requirements/docs.in
101 natsort==8.4.0
102 # via mkdocs-awesome-nav
112 -packaging==26.2
103 +packaging==26.3
104 # via
105 # mkdocs
106 + # mkdocs-git-revision-date-localized-plugin
107 # properdocs
108 paginate==0.5.7
109 # via mkdocs-material
@@ -119,7 +111,7 @@ pathspec==1.1.1
111 # via
112 # mkdocs
113 # properdocs
122 -platformdirs==4.9.6
114 +platformdirs==4.11.12
115 # via
116 # mkdocs-get-deps
117 # properdocs
@@ -127,15 +119,15 @@ properdocs==1.6.7
119 # via
120 # mkdocs-gen-files
121 # mkdocs-redirects
130 -pydantic==2.13.4
122 +pydantic==2.13.5
123 # via
124 # -r requirements/docs.in
125 # mkdocs-awesome-nav
134 -pydantic-core==2.46.4
126 +pydantic-core==2.46.5
127 # via pydantic
136 -pygments==2.20.0
128 +pygments==2.21.0
129 # via mkdocs-material
138 -pymdown-extensions==10.21.2
130 +pymdown-extensions==12.0.1
131 # via
132 # mkdocs-material
133 # mkdocstrings
@@ -153,30 +145,30 @@ pyyaml-env-tag==1.1
145 # via
146 # mkdocs
147 # properdocs
156 -regex==2026.4.4
148 +regex==2026.9.10
149 # via -r requirements/docs.in
158 -requests==2.33.1
150 +requests==2.34.2
151 # via mkdocs-material
160 -ruff==0.15.12
152 +ruff==0.16.8
153 # via -r requirements/docs.in
162 -selectolax==0.4.8
154 +selectolax==0.4.12
155 # via mkdocs-glightbox
156 six==1.17.0
157 # via python-dateutil
158 smmap==5.0.3
159 # via gitdb
168 -typing-extensions==4.15.0
160 +typing-extensions==4.16.0
161 # via
162 # pydantic
163 # pydantic-core
164 # typing-inspection
173 -typing-inspection==0.4.2
165 +typing-inspection==0.4.4
166 # via pydantic
175 -urllib3==2.6.3
167 +urllib3==2.8.0
168 # via requests
169 watchdog==6.0.0
170 # via
171 # mkdocs
172 # properdocs
181 -wcmatch==10.1
173 +wcmatch==11.0.1
174 # via mkdocs-awesome-nav