|
14 | 14 | # serve to show the default.
|
15 | 15 |
|
16 | 16 | import os
|
17 |
| -import sys |
18 | 17 |
|
19 | 18 | # Add any Sphinx extension module names here, as strings. They can be
|
20 | 19 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
21 | 20 | # ones.
|
22 |
| -import IPython |
| 21 | + |
23 | 22 |
|
24 | 23 | import pandas_datareader as pdr
|
25 |
| -import sphinx_rtd_theme |
| 24 | + |
| 25 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 26 | +if on_rtd: |
| 27 | + import sphinx_rtd_theme |
| 28 | +else: |
| 29 | + import pydata_sphinx_theme # noqa: F401 |
26 | 30 |
|
27 | 31 | # If extensions (or modules to document with autodoc) are in another directory,
|
28 | 32 | # add these directories to sys.path here. If the directory is relative to the
|
|
64 | 68 |
|
65 | 69 | # General information about the project.
|
66 | 70 | project = u"pandas-datareader"
|
67 |
| -copyright = u"2018, The PyData Development Team" |
| 71 | +copyright = u"2020, The PyData Development Team" |
68 | 72 | author = "The PyData Development Team"
|
69 | 73 |
|
70 | 74 | # The version info for the project you're documenting, acts as replacement for
|
|
105 | 109 |
|
106 | 110 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
107 | 111 | # a list of builtin themes.
|
108 |
| -html_theme = "sphinx_rtd_theme" |
109 |
| -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 112 | +if on_rtd: |
| 113 | + html_theme = "sphinx_rtd_theme" |
| 114 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 115 | +else: |
| 116 | + html_theme = "pydata_sphinx_theme" |
| 117 | + # html_theme_path = pydata_sphinx_theme.get_html_theme_path() |
| 118 | + html_theme_options = { |
| 119 | + "external_links": [], |
| 120 | + "github_url": "https://github.com/pydata/pandas-datareader", |
| 121 | + } |
110 | 122 |
|
111 | 123 | # Theme options are theme-specific and customize the look and feel of a theme
|
112 | 124 | # further. For a list of options available for each theme, see the
|
|
0 commit comments