From 6439a26b8118ed489fdceac5e15c013f30cdb317 Mon Sep 17 00:00:00 2001 From: philipstarkey Date: Sat, 20 Jun 2020 18:32:02 +1000 Subject: [PATCH] fix docs conf bugs identified in labscript-suite/labscript-utils#57 --- docs/source/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index d27dbccb..1bbadc91 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -133,8 +133,10 @@ # whether to use stable or latest version labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest') -if labscript_suite_doc_version not in ['stable', 'latest']: +if '.' in labscript_suite_doc_version: labscript_suite_doc_version = 'stable' +elif labscript_suite_doc_version not in ['stable', 'latest']: + labscript_suite_doc_version = 'latest' # add intersphinx references for each component for ls_prog in labscript_suite_programs: @@ -205,7 +207,7 @@ def setup(app): app.add_config_value('m2r_anonymous_references', False, 'env') app.add_config_value('m2r_disable_inline_math', False, 'env') app.add_directive('mdinclude', MdInclude) - app.add_stylesheet('custom.css') + app.add_css_file('custom.css') # generate the components.rst file dynamically so it points to stable/latest # of subprojects correctly