Skip to content

Commit e1bd43c

Browse files
authored
Update sphinx theme (#2031)
* Update requirements.txt * Update conf.py * Update conf.py
1 parent 7ee5a8b commit e1bd43c

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
sphinx==1.7.3
22
sphinxcontrib-googleanalytics
3-
-e git://github.com/snide/sphinx_rtd_theme.git#egg=sphinx_rtd_theme
3+
-e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme

docs/source/conf.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# sys.path.insert(0, os.path.abspath('.'))
2323
import torch
2424
import torchvision
25-
import sphinx_rtd_theme
25+
import pytorch_sphinx_theme
2626

2727

2828
# -- General configuration ------------------------------------------------
@@ -104,8 +104,8 @@
104104
# The theme to use for HTML and HTML Help pages. See the documentation for
105105
# a list of builtin themes.
106106
#
107-
html_theme = 'sphinx_rtd_theme'
108-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
107+
html_theme = 'pytorch_sphinx_theme'
108+
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
109109

110110
# Theme options are theme-specific and customize the look and feel of a theme
111111
# further. For a list of options available for each theme, see the
@@ -115,6 +115,7 @@
115115
'collapse_navigation': False,
116116
'display_version': True,
117117
'logo_only': True,
118+
'pytorch_project': 'docs',
118119
}
119120

120121
html_logo = '_static/img/pytorch-logo-dark.svg'
@@ -125,12 +126,12 @@
125126
html_static_path = ['_static']
126127

127128
# html_style_path = 'css/pytorch_theme.css'
128-
html_context = {
129-
'css_files': [
130-
'https://fonts.googleapis.com/css?family=Lato',
131-
'_static/css/pytorch_theme.css'
132-
],
133-
}
129+
# html_context = {
130+
# 'css_files': [
131+
# 'https://fonts.googleapis.com/css?family=Lato',
132+
# '_static/css/pytorch_theme.css'
133+
# ],
134+
# }
134135

135136

136137
# -- Options for HTMLHelp output ------------------------------------------

0 commit comments

Comments
 (0)