Skip to content

Commit 0f0da2e

Browse files
committed
Added links to other component docs
1 parent ffbdd5a commit 0f0da2e

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@ dmypy.json
129129
.pyre/
130130

131131
# Editors
132-
.vscode/
132+
.vscode/
133+
134+
# dynamically generated docs
135+
docs/source/component_docs.rst

docs/source/conf.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
105105
labscript_suite_programs.remove(project)
106106

107107
# whether to use stable or latest version
108-
labscript_suite_doc_version = 'stable' # 'stable' or 'latest'
108+
labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
109+
if labscript_suite_doc_version not in ['stable', 'latest']:
110+
labscript_suite_doc_version = 'stable'
109111

110112
# add intersphinx references for each component
111113
for ls_prog in labscript_suite_programs:
@@ -143,9 +145,10 @@
143145
# The theme to use for HTML and HTML Help pages. See the documentation for
144146
# a list of builtin themes.
145147
#
146-
# html_theme = 'alabaster'
147148
html_theme = "sphinx_rtd_theme"
148-
html_title = "labscript suite | experiment control and automation"
149+
html_title = "labscript suite | {project}".format(
150+
project=project if project != "labscript-suite" else "experiment control and automation"
151+
)
149152
html_short_title = "labscript suite"
150153

151154
# Add any paths that contain custom static files (such as style sheets) here,
@@ -175,3 +178,22 @@ def setup(app):
175178
app.add_config_value('m2r_disable_inline_math', False, 'env')
176179
app.add_directive('mdinclude', MdInclude)
177180
app.add_stylesheet('custom.css')
181+
182+
with open(
183+
os.path.join(os.path.dirname(os.path.realpath(__file__)), 'component_docs.rst'),
184+
'w',
185+
) as f:
186+
f.write("labscript suite components\n")
187+
f.write("==========================\n")
188+
f.write(" \n")
189+
f.write(".. toctree::\n")
190+
f.write(" :maxdepth: 2\n")
191+
f.write(" \n")
192+
if project != "the labscript suite":
193+
f.write(
194+
" labscript suite (metapackage)<{}>\n".format(
195+
intersphinx_mapping['labscript-suite'][0]
196+
)
197+
)
198+
for ls_prog in labscript_suite_programs:
199+
f.write(" {} <{}>\n".format(ls_prog, intersphinx_mapping[ls_prog][0]))

docs/source/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@
7171
installation/index
7272
changes
7373
contributing
74-
archive
74+
component_docs
7575
Home Page <http://labscriptsuite.org>
7676
Source Code <https://github.com/labscript-suite/labscript-suite>
77+
archive
7778

7879
.. todolist::

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy