Skip to content

Commit 4bb24db

Browse files
authored
sitemap fix (pymc-devs#640)
* try fixing sitemap urls * update robots.txt * fix url template for sitemap entries
1 parent 87b1c0d commit 4bb24db

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/conf.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def setup(app: Sphinx):
7272
# theme options
7373
html_theme = "pymc_sphinx_theme"
7474
html_baseurl = "https://www.pymc.io/projects/examples/"
75+
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
76+
sitemap_url_scheme = f"{{lang}}{rtd_version}/{{link}}"
7577
html_theme_options = {
7678
"secondary_sidebar_items": ["postcard", "page-toc", "edit-this-page", "sourcelink", "donate"],
7779
"navbar_start": ["navbar-logo"],
@@ -82,8 +84,7 @@ def setup(app: Sphinx):
8284
"show_prev_next": True,
8385
"article_footer_items": ["rendered_citation.html"],
8486
}
85-
version = os.environ.get("READTHEDOCS_VERSION", "")
86-
version = version if "." in version else "main"
87+
version = version if "." in rtd_version else "main"
8788
doi_code = os.environ.get("DOI_READTHEDOCS", "10.5281/zenodo.5654871")
8889
html_context = {
8990
"github_url": "https://github.com",

examples/robots.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
User-agent: *
22

3-
Sitemap: https://www.pymc.io/projects/examples/sitemap.xml
3+
Sitemap: https://www.pymc.io/projects/examples/en/latest/sitemap.xml

0 commit comments

Comments
 (0)