@@ -204,13 +204,9 @@ def autodoc_process_docstring(
204204 logger .warning ("outdated list of undocumented things" )
205205
206206
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.
212207def 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" )
214210 app .connect ("autodoc-process-signature" , autodoc_process_signature )
215211 app .connect ("autodoc-process-docstring" , autodoc_process_docstring )
216212
@@ -219,12 +215,7 @@ def setup(app: Sphinx) -> None:
219215 app .connect ("source-read" , on_read_source )
220216
221217
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" )}
228219
229220# -- General configuration ------------------------------------------------
230221
@@ -414,6 +405,7 @@ def add_mapping(
414405 "navigation_depth" : 4 ,
415406 "logo_only" : True ,
416407 "prev_next_buttons_location" : "both" ,
408+ "style_nav_header_background" : "#d2e7fa" ,
417409}
418410
419411# Add any paths that contain custom static files (such as style sheets) here,
0 commit comments