Skip to content

Commit

Permalink
[fbsync] Add copy button and automatic cross-refs to external project…
Browse files Browse the repository at this point in the history
…s in docs (#3868)

Reviewed By: vincentqb, cpuhrsch

Differential Revision: D28677166

fbshipit-source-id: ae065ac44d28884ec6e1746318e33a7eb877e8c1
  • Loading branch information
datumbox authored and facebook-github-bot committed May 25, 2021
1 parent b89cf06 commit 18e563d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sphinx==2.4.4
sphinx-gallery>=0.9.0
sphinx-copybutton>=0.3.1
matplotlib
numpy
-e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from pathlib import Path
import os

import torch
import torchvision
import pytorch_sphinx_theme

Expand All @@ -48,7 +44,9 @@
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.duration',
'sphinx_gallery.gen_gallery',
"sphinx_copybutton"
]

sphinx_gallery_conf = {
Expand Down Expand Up @@ -202,7 +200,10 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
'torch': ('https://pytorch.org/docs/stable/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'PIL': ('https://pillow.readthedocs.io/en/stable/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
Expand Down

0 comments on commit 18e563d

Please sign in to comment.