Skip to content

Commit 4a6149d

Browse files
committed
Update conf.py
Hide versionchooser, fix sitemap URLs
1 parent 0d85bfe commit 4a6149d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/conf.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
from crate.theme.rtd.conf.sqlalchemy_cratedb import *
22

3-
3+
# Fallback guards, when parent theme does not introduce them.
4+
if "html_theme_options" not in globals():
5+
html_theme_options = {}
46
if "intersphinx_mapping" not in globals():
57
intersphinx_mapping = {}
68

9+
# Re-configure sitemap generation URLs.
10+
# This is a project without versioning.
11+
sitemap_url_scheme = "{link}"
12+
13+
# Disable version chooser.
14+
html_context.update({
15+
"display_version": False,
16+
"current_version": None,
17+
"versions": [],
18+
})
719

820
intersphinx_mapping.update({
921
'py': ('https://docs.python.org/3/', None),
@@ -12,11 +24,9 @@
1224
'pandas': ('https://pandas.pydata.org/docs/', None),
1325
})
1426

15-
1627
linkcheck_anchors = True
1728
linkcheck_ignore = [r"https://github.com/crate/cratedb-examples/blob/main/by-language/python-sqlalchemy/.*"]
1829

19-
2030
rst_prolog = """
2131
.. |nbsp| unicode:: 0xA0
2232
:trim:

0 commit comments

Comments
 (0)