From a1cccef251640a1bce27a7485a8830ed2b61850f Mon Sep 17 00:00:00 2001
From: patrick96
Date: Fri, 14 Dec 2018 10:32:49 +0100
Subject: [PATCH] refactor(doc): Use default theme for local builds
The sphinx_rtd_theme takes up about 7.8MB because it includes a lot of
fonts. The default theme only takes 600KB
---
doc/conf.py.in | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/conf.py.in b/doc/conf.py.in
index 6046d371..5d94d815 100644
--- a/doc/conf.py.in
+++ b/doc/conf.py.in
@@ -12,7 +12,7 @@
# 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.
#
-# import os
+import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -71,10 +71,16 @@ pygments_style = None
# -- Options for HTML output -------------------------------------------------
+# is whether we are on readthedocs.io
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = 'sphinx_rtd_theme'
+if on_rtd:
+ html_theme = 'sphinx_rtd_theme'
+else:
+ html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the