Skip to content

Commit 664c16d

Browse files
Merge pull request #293 from huard/rtd_theme
Read the docs theme
2 parents bb736d7 + c229c8b commit 664c16d

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

docs/source/_static/style.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@import url("theme.css");
2+
3+
.wy-side-nav-search>a img.logo,
4+
.wy-side-nav-search .wy-dropdown>a img.logo {
5+
width: 12rem;
6+
}
7+
8+
/* Logo and search background color */
9+
.wy-side-nav-search {
10+
background-color: #eee;
11+
}
12+
13+
/* The color of the Flyingpigeon text above the logo. */
14+
.wy-side-nav-search>a{
15+
color: #2f3974;
16+
}
17+
18+
.wy-side-nav-search>div.version {
19+
display: none;
20+
}
21+
22+
.wy-nav-top {
23+
background-color: #555;
24+
}

docs/source/_templates/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{% extends "!layout.html" %}
2+
{% set css_files = css_files + ["_static/style.css"] %}

docs/source/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@
8787

8888
# The theme to use for HTML and HTML Help pages. See the documentation for
8989
# a list of builtin themes.
90-
html_theme = 'alabaster'
90+
# html_theme = 'alabaster'
91+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
92+
93+
if on_rtd:
94+
html_theme = 'default'
95+
else: # only import and set the theme if we're building docs locally
96+
import sphinx_rtd_theme
97+
html_theme = 'sphinx_rtd_theme'
98+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
9199

92100
# Theme options are theme-specific and customize the look and feel of a
93101
# theme further. For a list of options available for each theme, see the

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ dependencies:
3333
- -e git+https://github.com/bird-house/eggshell.git#egg=eggshell
3434
- -e git+https://github.com/NCPP/ocgis#egg=owslib
3535
- -e git+https://github.com/geopython/pywps.git#egg=pywps
36+
- sphinx_rtd_theme

0 commit comments

Comments
 (0)