File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2222import os
2323import re
2424
25- # Set canonical URL from the Read the Docs Domain
26- html_baseurl = os . environ . get ( "READTHEDOCS_CANONICAL_URL" , "" )
25+ # Set canonical URL for the sitemap
26+ html_baseurl = "https://python4data.science/en/latest/"
2727
2828html_context = {}
2929# Tell Jinja2 templates the build is running on Read the Docs
5454 "sphinx.ext.todo" ,
5555 "sphinx_copybutton" ,
5656 "sphinx_inline_tabs" ,
57+ "sphinx_sitemap" ,
5758 "sphinxcontrib.cairosvgconverter" ,
5859 "sphinxext.opengraph" ,
5960]
@@ -246,3 +247,13 @@ def setup(app):
246247# -- graphviz configuration --------------------------------------------------
247248
248249graphviz_output_format = "svg"
250+
251+ # -- sitemap configuration ---------------------------------------------------
252+
253+ sitemap_url_scheme = "{link}"
254+ sitemap_excludes = [
255+ "404.html" ,
256+ "search.html" ,
257+ "genindex.html" ,
258+ ]
259+ sitemap_show_lastmod = True
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ docs = [
2626 " sphinx-copybutton" ,
2727 " sphinx-lint" ,
2828 " sphinx-notfound-page" ,
29+ " sphinx-sitemap" ,
2930 " sphinx_inline_tabs" ,
3031 " sphinxcontrib-svg2pdfconverter" ,
3132 " sphinxext.opengraph" , # matplotlib is required for social cards
You can’t perform that action at this time.
0 commit comments