Skip to content

Commit 3ff72cf

Browse files
authored
Add a version menu to the Sphinx build (#394)
* Fix warnings in the Sphinx build * Include the version number in the header * Enable the version dropdown menu To make this work, a versions.json file will need to be added to the root of the gh-pages branch, which is a dict mapping "label": "path" for each version. This should be updated whenever a new version is tagged.
1 parent 4c134fe commit 3ff72cf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: spec/conf.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
('py:class', 'collections.abc.Sequence'),
6363
('py:class', "Optional[Union[int, float, Literal[inf, - inf, 'fro', 'nuc']]]"),
6464
('py:class', "Union[int, float, Literal[inf, - inf]]"),
65+
('py:obj', "typing.Optional[typing.Union[int, float, typing.Literal[inf, - inf, 'fro', 'nuc']]]"),
66+
('py:obj', "typing.Union[int, float, typing.Literal[inf, - inf]]"),
6567
('py:class', 'PyCapsule'),
6668
('py:class', 'enum.Enum'),
6769
('py:class', 'ellipsis'),
@@ -123,7 +125,7 @@
123125
html_theme_options = {
124126

125127
# Set the name of the project to appear in the navigation.
126-
'nav_title': 'Python array API standard',
128+
'nav_title': f'Python array API standard {release}',
127129

128130
# Set you GA account ID to enable tracking
129131
#'google_analytics_account': 'UA-XXXXX',
@@ -170,8 +172,8 @@
170172
#"customization": "Configuration options to personalize your site.",
171173
},
172174

173-
#"version_dropdown": True,
174-
#"version_json": "_static/versions.json",
175+
"version_dropdown": True,
176+
"version_json": "../versions.json",
175177
"table_classes": ["plain"],
176178
}
177179

0 commit comments

Comments
 (0)