Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed URL for API reference to be shorter #57

Merged
merged 3 commits into from
Jun 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ This documentation is primarily for developers who might want to use this common
:hidden:
:caption: DOCUMENTATION

api_reference/index
API Reference <api/index>

.. toctree::
:maxdepth: 2