From aa7a40c1b8d193f356cb2ebf599bcd10d7635d99 Mon Sep 17 00:00:00 2001 From: Kay Kim Date: Tue, 1 Aug 2017 17:59:25 -0400 Subject: [PATCH] docs: add google tag (#331) Update copyright for docs. --- doc/_templates/layout.html | 19 +++++++++++++++++++ doc/conf.py | 10 ++++++++-- doc/pydoctheme/theme.conf | 1 + 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 doc/_templates/layout.html diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html new file mode 100644 index 000000000..fcaa37b4f --- /dev/null +++ b/doc/_templates/layout.html @@ -0,0 +1,19 @@ +{% extends "!layout.html" %} + +{%- block extrahead %} + + {% if theme_googletag %} + + + + + + {% endif %} +{%- endblock -%} + diff --git a/doc/conf.py b/doc/conf.py index 8e367cdac..676e87655 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -9,6 +9,8 @@ sys.path[0:0] = [os.path.abspath('..')] import pymongo +import datetime + # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions @@ -28,7 +30,8 @@ master_doc = 'index' # General information about the project. project = u'PyMongo' -copyright = u'2008 - 2015, MongoDB, Inc.' +copyright = u'MongoDB, Inc. 2008-{0}. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc'.format(datetime.date.today().year) +html_show_sphinx = False # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -82,7 +85,10 @@ db = client.doctest_test # Theme gratefully vendored from CPython source. html_theme = "pydoctheme" html_theme_path = ["."] -html_theme_options = {'collapsiblesidebar': True} +html_theme_options = { + 'collapsiblesidebar': True, + 'googletag': False +} # Additional static files. html_static_path = ['static'] diff --git a/doc/pydoctheme/theme.conf b/doc/pydoctheme/theme.conf index 0c4388167..88bf38734 100644 --- a/doc/pydoctheme/theme.conf +++ b/doc/pydoctheme/theme.conf @@ -21,3 +21,4 @@ visitedlinkcolor = #00608f headtextcolor = #1a1a1a headbgcolor = white headlinkcolor = #aaaaaa +googletag = False