Skip to content

Commit

Permalink
Use alabaster theme (googleapis#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott authored and landrito committed Aug 22, 2017
1 parent ade637b commit 70b0057
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
16 changes: 16 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono');

@media screen and (min-width: 1080px) {
div.document {
width: 1040px;
}
}

code.descname {
color: #4885ed;
}

th.field-name {
min-width: 100px;
color: #3cba54;
}
42 changes: 24 additions & 18 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,14 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from email import message_from_string
import email
import os
from pkg_resources import get_distribution
import sys
import urllib

import sphinx_rtd_theme


ON_READ_THE_DOCS = os.environ.get('READTHEDOCS', None) == 'True'
import pkg_resources

# If extensions (or modules to document with autodoc) are in another directory,
# 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.
sys.path.insert(0, os.path.abspath('..'))
# sys.path.insert(0, os.path.abspath('..'))

# -- General configuration -----------------------------------------------------

Expand Down Expand Up @@ -77,7 +70,7 @@
# built documents.
#
# The short X.Y version.
distro = get_distribution('google-cloud')
distro = pkg_resources.get_distribution('google-cloud')
release = os.getenv('SPHINX_RELEASE', distro.version)

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down Expand Up @@ -119,15 +112,21 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

if not ON_READ_THE_DOCS:
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
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
# documentation.
#html_theme_options = {}
html_theme_options = {
'description': 'Google Cloud Client Libraries for Python',
'github_user': 'GoogleCloudPlatform',
'github_repo': 'google-cloud-python',
'github_banner': True,
'travis_button': True,
'font_family': "'Roboto', Georgia, sans",
'head_font_family': "'Roboto', Georgia, serif",
'code_font_family': "'Roboto Mono', 'Consolas', monospace",
}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
Expand Down Expand Up @@ -164,7 +163,14 @@
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
]
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down Expand Up @@ -216,7 +222,7 @@
}

metadata = distro.get_metadata(distro.PKG_INFO)
author = message_from_string(metadata).get('Author')
author = email.message_from_string(metadata).get('Author')
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
Expand Down

0 comments on commit 70b0057

Please sign in to comment.