Skip to content

Commit 8b24510

Browse files
committed
Eliminate error w/ permalink setting for sphinx 5+; enable opesearch
opensearch enabled for website build only. Not local docs.
1 parent 96c8b44 commit 8b24510

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

doc/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@
118118
pygments_style = 'sphinx'
119119

120120
# disable permalinks
121-
html_add_permalinks = ''
122-
html_permalinks = False # when sphinx > 3.5 is used.
121+
from sphinx import version_info
122+
if version_info < (3,5,0):
123+
html_add_permalinks = ''
124+
else:
125+
html_permalinks = False # when sphinx > 3.5 is used.
123126

124127
# A list of ignored prefixes for module index sorting.
125128
#modindex_common_prefix = []

website/www/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@
169169
#html_additional_pages = {}
170170

171171
# disable permalinks
172-
html_add_permalinks = ''
173-
html_permalinks = False # when sphinx > 3.5 is used.
172+
from sphinx import version_info
173+
if version_info < (3,5,0):
174+
html_add_permalinks = ''
175+
else:
176+
html_permalinks = False # when sphinx > 3.5 is used.
174177

175178
# If false, no module index is generated.
176179
#html_use_modindex = True
@@ -187,7 +190,7 @@
187190
# If true, an OpenSearch description file will be output, and all pages will
188191
# contain a <link> tag referring to it. The value of this option must be the
189192
# base URL from which the finished HTML is served.
190-
html_use_opensearch = ''
193+
html_use_opensearch = html_baseurl
191194

192195
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
193196
#html_file_suffix = ''

0 commit comments

Comments
 (0)