@@ -167,25 +167,16 @@ def autodoc_process_signature(
167167 return signature , return_annotation
168168
169169
170- # XX hack the RTD theme until
171- # https://github.com/rtfd/sphinx_rtd_theme/pull/382
172- # is shipped (should be in the release after 0.2.4)
173- # ...note that this has since grown to contain a bunch of other CSS hacks too
174- # though.
175170def setup (app : Sphinx ) -> None :
176- app .add_css_file ("hackrtd.css" )
171+ # Add our custom styling to make our documentation better!
172+ app .add_css_file ("styles.css" )
177173 app .connect ("autodoc-process-signature" , autodoc_process_signature )
178174 # After Intersphinx runs, add additional mappings.
179175 app .connect ("builder-inited" , add_intersphinx , priority = 1000 )
180176 app .connect ("source-read" , on_read_source )
181177
182178
183- # Our docs use the READTHEDOCS variable, so copied from:
184- # https://about.readthedocs.com/blog/2024/07/addons-by-default/
185- if os .environ .get ("READTHEDOCS" , "" ) == "True" :
186- if "html_context" not in globals ():
187- html_context = {}
188- html_context ["READTHEDOCS" ] = True
179+ html_context = {"current_version" : os .environ .get ("READTHEDOCS_VERSION_NAME" )}
189180
190181# -- General configuration ------------------------------------------------
191182
@@ -375,6 +366,7 @@ def add_mapping(
375366 "navigation_depth" : 4 ,
376367 "logo_only" : True ,
377368 "prev_next_buttons_location" : "both" ,
369+ "style_nav_header_background" : "#d2e7fa" ,
378370}
379371
380372# Add any paths that contain custom static files (such as style sheets) here,
0 commit comments