File tree Expand file tree Collapse file tree 4 files changed +14
-22
lines changed Expand file tree Collapse file tree 4 files changed +14
-22
lines changed Original file line number Diff line number Diff line change 22#
33
44# You can set these variables from the command line.
5- SPHINXOPTS = -W # turn warnings into errors
5+ SPHINXOPTS = # -W # turn warnings into errors
66SPHINXBUILD = sphinx-build
77SPHINXPROJ = torchvision
88SOURCEDIR = source
Original file line number Diff line number Diff line change 1- sphinx == 1.7.3
2- sphinxcontrib-googleanalytics
1+ sphinx
32-e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
Original file line number Diff line number Diff line change 11{% extends "!layout.html" %}
22
3+ {%- block extrahead %}
4+ <!-- Google Analytics -->
5+ < script >
6+ window . ga = window . ga || function ( ) { ( ga . q = ga . q || [ ] ) . push ( arguments ) } ; ga . l = + new Date ;
7+ ga ( 'create' , 'UA-90545585-1' , 'auto' ) ;
8+ ga ( 'send' , 'pageview' ) ;
9+ </ script >
10+ < script async src ='https://www.google-analytics.com/analytics.js '> </ script >
11+ <!-- End Google Analytics -->
12+ {{ super() }}
13+ {% endblock %}
14+
315{% block sidebartitle %}
416 < div class ="version ">
517 < a href ='https://pytorch.org/vision/versions.html '> {{ version }} ▼</ a >
Original file line number Diff line number Diff line change 2323import torch
2424import torchvision
2525import pytorch_sphinx_theme
26- from sphinxcontrib import googleanalytics
2726
2827
29- # Wrap sphinxcontrib-googleanalytics setup() function to avoid a Sphinx warning:
30- # "WARNING: extension ‘sphinxcontrib.googleanalytics’ returned an unsupported
31- # object from its setup() function; it should return None or a metadata
32- # dictionary"
33- _googleanalytics_setup_original = googleanalytics .setup
34-
35-
36- def _googleanalytics_setup_wrapper (app ):
37- _googleanalytics_setup_original (app )
38- return {"version" : "0.1" }
39-
40-
41- googleanalytics .setup = _googleanalytics_setup_wrapper
42-
4328# -- General configuration ------------------------------------------------
4429
4530# If your documentation needs a minimal Sphinx version, state it here.
@@ -59,16 +44,12 @@ def _googleanalytics_setup_wrapper(app):
5944 'sphinx.ext.mathjax' ,
6045 'sphinx.ext.napoleon' ,
6146 'sphinx.ext.viewcode' ,
62- 'sphinxcontrib.googleanalytics' ,
6347]
6448
6549napoleon_use_ivar = True
6650napoleon_numpy_docstring = False
6751napoleon_google_docstring = True
6852
69- googleanalytics_id = 'UA-90545585-1'
70- googleanalytics_enabled = True
71-
7253# Add any paths that contain templates here, relative to this directory.
7354templates_path = ['_templates' ]
7455
You can’t perform that action at this time.
0 commit comments