Skip to content

Commit 2e3ea56

Browse files
OriolAbriltwiecki
authored andcommitted
add sitemap to docs
1 parent 74748c7 commit 2e3ea56

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

conda-envs/environment-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- sphinx-copybutton
2929
- sphinx-design
3030
- sphinx-notfound-page
31+
- sphinx-sitemap
3132
- sphinx>=5
3233
- sphinxext-rediraffe
3334
- watermark

docs/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"sphinx_remove_toctrees",
4747
"jupyter_sphinx",
4848
"sphinxext.rediraffe",
49+
"sphinx_sitemap",
4950
]
5051

5152
# Don't auto-generate summary for class members.
@@ -108,8 +109,8 @@
108109

109110
version = pymc.__version__
110111
on_readthedocs = os.environ.get("READTHEDOCS", False)
112+
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
111113
if on_readthedocs:
112-
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
113114
if rtd_version.lower() == "stable":
114115
version = pymc.__version__.split("+")[0]
115116
elif rtd_version.lower() == "latest":
@@ -337,6 +338,8 @@ def setup(app):
337338
# The theme to use for HTML and HTML Help pages. See the documentation for
338339
# a list of builtin themes.
339340
html_theme = "pymc_sphinx_theme"
341+
html_baseurl = "https://www.pymc.io/projects/docs/"
342+
sitemap_url_scheme = f"{{lang}}{rtd_version}/{{link}}"
340343

341344

342345
# Theme options are theme-specific and customize the look and feel of a theme

0 commit comments

Comments
 (0)