@@ -204,13 +204,9 @@ def autodoc_process_docstring(
204
204
logger .warning ("outdated list of undocumented things" )
205
205
206
206
207
- # XX hack the RTD theme until
208
- # https://github.com/rtfd/sphinx_rtd_theme/pull/382
209
- # is shipped (should be in the release after 0.2.4)
210
- # ...note that this has since grown to contain a bunch of other CSS hacks too
211
- # though.
212
207
def setup (app : Sphinx ) -> None :
213
- app .add_css_file ("hackrtd.css" )
208
+ # Add our custom styling to make our documentation better!
209
+ app .add_css_file ("styles.css" )
214
210
app .connect ("autodoc-process-signature" , autodoc_process_signature )
215
211
app .connect ("autodoc-process-docstring" , autodoc_process_docstring )
216
212
@@ -219,12 +215,7 @@ def setup(app: Sphinx) -> None:
219
215
app .connect ("source-read" , on_read_source )
220
216
221
217
222
- # Our docs use the READTHEDOCS variable, so copied from:
223
- # https://about.readthedocs.com/blog/2024/07/addons-by-default/
224
- if os .environ .get ("READTHEDOCS" , "" ) == "True" :
225
- if "html_context" not in globals ():
226
- html_context = {}
227
- html_context ["READTHEDOCS" ] = True
218
+ html_context = {"current_version" : os .environ .get ("READTHEDOCS_VERSION_NAME" )}
228
219
229
220
# -- General configuration ------------------------------------------------
230
221
@@ -414,6 +405,7 @@ def add_mapping(
414
405
"navigation_depth" : 4 ,
415
406
"logo_only" : True ,
416
407
"prev_next_buttons_location" : "both" ,
408
+ "style_nav_header_background" : "#d2e7fa" ,
417
409
}
418
410
419
411
# Add any paths that contain custom static files (such as style sheets) here,
0 commit comments