diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css new file mode 100644 index 0000000..44e392e --- /dev/null +++ b/docs/_static/theme_overrides.css @@ -0,0 +1,3 @@ +.wy-nav-content { + max-width: 1100px +} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index bf42a0c..1656318 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,7 +30,14 @@ import shlex # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -283,3 +290,26 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +# -- ReadTheDoc requirements and local template generation--------------------- + +# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + # Override default css to get a larger width for local build + def setup(app): + #app.add_javascript("custom.js") + app.add_stylesheet('theme_overrides.css') +else: + # Override default css to get a larger width for ReadTheDoc build + html_context = { + 'css_files': [ + 'https://media.readthedocs.org/css/sphinx_rtd_theme.css', + 'https://media.readthedocs.org/css/readthedocs-doc-embed.css', + '_static/theme_overrides.css', + ], + } \ No newline at end of file