Skip to content

Commit ee77225

Browse files
authored
add sitemap and robots.txt (#97)
* add sitemap and robots.txt * update requirements * fix rtd preview link action
1 parent ea8f25b commit ee77225

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

.github/workflows/rtd-link-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ jobs:
1414
- uses: readthedocs/actions/preview@v1
1515
with:
1616
project-slug: "pymcio"
17+
single-version: true

conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"notfound.extension",
4343
"jupyterlite_sphinx",
4444
"sphinxext.rediraffe",
45+
"sphinx_sitemap",
4546
]
4647

4748
# List of patterns, relative to source directory, that match files and
@@ -134,6 +135,9 @@ def setup(app):
134135
# a list of builtin themes.
135136
#
136137
html_theme = "pymc_sphinx_theme"
138+
html_baseurl = "https://www.pymc.io/"
139+
sitemap_url_scheme = "{link}"
140+
html_extra_path = ["robots.txt", "sitemapindex.xml"]
137141
# Add any paths that contain custom static files (such as style sheets) here,
138142
# relative to this directory. They are copied after the builtin static files,
139143
# so a file named "default.css" will overwrite the builtin "default.css".

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ jupyterlite-sphinx
1010
jupyterlite-pyodide-kernel
1111
sphinxext-rediraffe
1212
pymc-sphinx-theme==0.14
13+
sphinx-sitemap

robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-agent: *
2+
3+
Sitemap: https://www.pymc.io/sitemapindex.xml

sitemapindex.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
4+
5+
<sitemap>
6+
<loc>https://www.pymc.io/sitemap.xml</loc>
7+
</sitemap>
8+
9+
<sitemap>
10+
<loc>https://www.pymc.io/projects/docs/en/stable/sitemap.xml</loc>
11+
</sitemap>
12+
13+
<sitemap>
14+
<loc>https://www.pymc.io/projects/examples/en/latest/sitemap.xml</loc>
15+
</sitemap>
16+
17+
</sitemapindex>

0 commit comments

Comments
 (0)