Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
1 change: 1 addition & 0 deletions .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx-gallery==0.11.1
sphinx_design
docutils==0.16
sphinx-copybutton
sphinx_sitemap==2.6.0
pypandoc==1.12
pandocfilters
markdown
Expand Down
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

13 changes: 11 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -* coding: utf-8 -*-
#
# PyTorch Tutorials documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 8 22:38:10 2017.
Expand Down Expand Up @@ -82,6 +82,7 @@
'sphinx_copybutton',
'sphinx_gallery.gen_gallery',
'sphinx_design',
'sphinx_sitemap'
]

intersphinx_mapping = {
Expand Down Expand Up @@ -120,6 +121,14 @@ def reset_seeds(gallery_conf, fname):
},
}

html_baseurl = 'https://pytorch.org/tutorials/' # needed for sphinx-sitemap
sitemap_locales = [None]
sitemap_excludes = [
"search.html",
"genindex.html",
]
sitemap_url_scheme = "{link}"

if os.getenv('GALLERY_PATTERN'):
# GALLERY_PATTERN is to be used when you want to work on a single
# tutorial. Previously this was fed into filename_pattern, but
Expand Down Expand Up @@ -182,7 +191,7 @@ def reset_seeds(gallery_conf, fname):
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'src/pytorch_sphinx_theme/docs']
exclude_patterns += sphinx_gallery_conf['examples_dirs']
exclude_patterns += ['*/index.rst']

Expand Down
Loading