Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions docs/custom_conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import os

# Custom configuration for the Sphinx documentation builder.
# All configuration specific to your project should be done in this file.
Expand Down Expand Up @@ -160,7 +161,8 @@
'canonical.related-links',
'canonical.custom-rst-roles',
'canonical.terminal-output',
'notfound.extension'
'notfound.extension',
'sphinx_sitemap'
]

# Add custom required Python modules that must be added to the
Expand All @@ -170,7 +172,9 @@
# pyspelling, sphinx, sphinx-autobuild, sphinx-copybutton, sphinx-design,
# sphinx-notfound-page, sphinx-reredirects, sphinx-tabs, sphinxcontrib-jquery,
# sphinxext-opengraph
custom_required_modules = []
custom_required_modules = [
'sphinx-sitemap',
]

# Add files or directories that should be excluded from processing.
custom_excludes = [
Expand Down Expand Up @@ -209,3 +213,20 @@
.. role:: center
:class: align-center
'''

#######################
# Sitemap configuration: https://sphinx-sitemap.readthedocs.io/
#######################

# Base URL of RTD hosted project

html_baseurl = 'https://documentation.ubuntu.com/data-science-stack/'

# URL scheme. Add language and version scheme elements.
# When configured with RTD variables, check for RTD environment so manual runs succeed:

if 'READTHEDOCS_VERSION' in os.environ:
version = os.environ["READTHEDOCS_VERSION"]
sitemap_url_scheme = '{version}{link}'
else:
sitemap_url_scheme = 'MANUAL/{link}'