Skip to content

Commit

Permalink
add sitemap to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OriolAbril authored and twiecki committed Feb 26, 2024
1 parent 74748c7 commit 2e3ea56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions conda-envs/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- sphinx-copybutton
- sphinx-design
- sphinx-notfound-page
- sphinx-sitemap
- sphinx>=5
- sphinxext-rediraffe
- watermark
Expand Down
5 changes: 4 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"sphinx_remove_toctrees",
"jupyter_sphinx",
"sphinxext.rediraffe",
"sphinx_sitemap",
]

# Don't auto-generate summary for class members.
Expand Down Expand Up @@ -108,8 +109,8 @@

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


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

0 comments on commit 2e3ea56

Please sign in to comment.