diff --git a/conf.py b/conf.py index 8d4eb33..92b2926 100644 --- a/conf.py +++ b/conf.py @@ -16,7 +16,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('sphinxext')) +#sys.path.append(os.path.abspath('sphinxext')) # -- General configuration ----------------------------------------------------- @@ -25,7 +25,6 @@ extensions = ['sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', - 'googleanalytics', #'ipython_console_highlighting', ] diff --git a/sphinxext/googleanalytics.py b/sphinxext/googleanalytics.py deleted file mode 100644 index b788aca..0000000 --- a/sphinxext/googleanalytics.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Google analytics sphinx extension from birkenfeld/sphinx-contrib/googleanalytics - -Used under BSD License -""" - -try: - from sphinx.application import ExtensionError -except: - from sphinx.errors import ExtensionError - - -def add_ga_javascript(app, pagename, templatename, context, doctree): - if not app.config.googleanalytics_enabled: - return - - metatags = context.get('metatags', '') - metatags += """""" % app.config.googleanalytics_id - context['metatags'] = metatags - -def check_config(app): - if not app.config.googleanalytics_id: - raise ExtensionError("'googleanalytics_id' config value must be set for ga statistics to function properly.") - -def setup(app): - app.add_config_value('googleanalytics_id', '', 'html') - app.add_config_value('googleanalytics_enabled', True, 'html') - app.connect('html-page-context', add_ga_javascript) - app.connect('builder-inited', check_config) - return {'version':'0.1'}