Skip to content

Commit 281b160

Browse files
committed
Add sitemap
1 parent 5c45426 commit 281b160

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.ci/docker/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sphinx-gallery==0.11.1
66
sphinx_design
77
docutils==0.16
88
sphinx-copybutton
9+
sphinx_sitemap==2.6.0
910
pypandoc==1.12
1011
pandocfilters
1112
markdown

conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
'sphinx_copybutton',
7777
'sphinx_gallery.gen_gallery',
7878
'sphinx_design',
79+
'sphinx_sitemap'
7980
]
8081

8182
intersphinx_mapping = {
@@ -114,6 +115,13 @@ def reset_seeds(gallery_conf, fname):
114115
},
115116
}
116117

118+
html_baseurl = 'https://pytorch.org/tutorials/' # needed for sphinx-sitemap
119+
sitemap_locales = [None]
120+
sitemap_excludes = [
121+
"search.html",
122+
"genindex.html",
123+
]
124+
117125
if os.getenv('GALLERY_PATTERN'):
118126
# GALLERY_PATTERN is to be used when you want to work on a single
119127
# tutorial. Previously this was fed into filename_pattern, but

0 commit comments

Comments
 (0)