|
23 | 23 | # All configuration values have a default; values that are commented out |
24 | 24 | # serve to show the default. |
25 | 25 |
|
26 | | -from email import message_from_string |
| 26 | +import email |
27 | 27 | import os |
28 | | -from pkg_resources import get_distribution |
29 | | -import sys |
30 | | -import urllib |
31 | | - |
32 | | -import sphinx_rtd_theme |
33 | | - |
34 | | - |
35 | | -ON_READ_THE_DOCS = os.environ.get('READTHEDOCS', None) == 'True' |
| 28 | +import pkg_resources |
36 | 29 |
|
37 | 30 | # If extensions (or modules to document with autodoc) are in another directory, |
38 | 31 | # add these directories to sys.path here. If the directory is relative to the |
39 | 32 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
40 | | -sys.path.insert(0, os.path.abspath('..')) |
| 33 | +# sys.path.insert(0, os.path.abspath('..')) |
41 | 34 |
|
42 | 35 | # -- General configuration ----------------------------------------------------- |
43 | 36 |
|
|
77 | 70 | # built documents. |
78 | 71 | # |
79 | 72 | # The short X.Y version. |
80 | | -distro = get_distribution('google-cloud') |
| 73 | +distro = pkg_resources.get_distribution('google-cloud') |
81 | 74 | release = os.getenv('SPHINX_RELEASE', distro.version) |
82 | 75 |
|
83 | 76 | # The language for content autogenerated by Sphinx. Refer to documentation |
|
119 | 112 |
|
120 | 113 | # The theme to use for HTML and HTML Help pages. See the documentation for |
121 | 114 | # a list of builtin themes. |
122 | | - |
123 | | -if not ON_READ_THE_DOCS: |
124 | | - html_theme = 'sphinx_rtd_theme' |
125 | | - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 115 | +html_theme = 'alabaster' |
126 | 116 |
|
127 | 117 | # Theme options are theme-specific and customize the look and feel of a theme |
128 | 118 | # further. For a list of options available for each theme, see the |
129 | 119 | # documentation. |
130 | | -#html_theme_options = {} |
| 120 | +html_theme_options = { |
| 121 | + 'description': 'Google Cloud Client Libraries for Python', |
| 122 | + 'github_user': 'GoogleCloudPlatform', |
| 123 | + 'github_repo': 'google-cloud-python', |
| 124 | + 'github_banner': True, |
| 125 | + 'travis_button': True, |
| 126 | + 'font_family': "'Roboto', Georgia, sans", |
| 127 | + 'head_font_family': "'Roboto', Georgia, serif", |
| 128 | + 'code_font_family': "'Roboto Mono', 'Consolas', monospace", |
| 129 | +} |
131 | 130 |
|
132 | 131 | # Add any paths that contain custom themes here, relative to this directory. |
133 | 132 | #html_theme_path = [] |
|
164 | 163 | #html_use_smartypants = True |
165 | 164 |
|
166 | 165 | # Custom sidebar templates, maps document names to template names. |
167 | | -#html_sidebars = {} |
| 166 | +html_sidebars = { |
| 167 | + '**': [ |
| 168 | + 'about.html', |
| 169 | + 'navigation.html', |
| 170 | + 'relations.html', |
| 171 | + 'searchbox.html', |
| 172 | + ] |
| 173 | +} |
168 | 174 |
|
169 | 175 | # Additional templates that should be rendered to pages, maps page names to |
170 | 176 | # template names. |
|
216 | 222 | } |
217 | 223 |
|
218 | 224 | metadata = distro.get_metadata(distro.PKG_INFO) |
219 | | -author = message_from_string(metadata).get('Author') |
| 225 | +author = email.message_from_string(metadata).get('Author') |
220 | 226 | # Grouping the document tree into LaTeX files. List of tuples |
221 | 227 | # (source start file, target name, title, author, documentclass [howto/manual]). |
222 | 228 | latex_documents = [ |
|
0 commit comments