Skip to content

Commit a7339f3

Browse files
committed
Use bw theme
1 parent 7d8b5ff commit a7339f3

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs/bw_sphinxtheme"]
2+
path = docs/bw_sphinxtheme
3+
url=git://github.com/dahlia/bw_sphinxtheme.git

docs/bw_sphinxtheme

Submodule bw_sphinxtheme added at eaee00d

docs/conf.py

+19-3
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,31 @@ def __repr__(self):
115115

116116
# The theme to use for HTML and HTML Help pages. See the documentation for
117117
# a list of builtin themes.
118-
html_theme = 'nature'
118+
if os.path.isdir('bw_sphinxtheme/bw_sphinxtheme'):
119+
html_theme = 'bw'
120+
pygments_style = 'pastie'
121+
else:
122+
print '-' * 74
123+
print 'Warning: bw_sphinxtheme unavailable. Building with default theme'
124+
print 'If you want the bw_sphinxtheme, run this command and build again:'
125+
print
126+
print ' git submodule update --init'
127+
print '-' * 74
128+
129+
html_theme = 'default'
119130

120131
# Theme options are theme-specific and customize the look and feel of a theme
121132
# further. For a list of options available for each theme, see the
122133
# documentation.
123-
html_theme_options = {}
134+
html_theme_options = {
135+
'github_ribbon': True,
136+
'github_ribbon_link': 'https://github.com/crosspop/sqlalchemy-imageattach'
137+
} if html_theme == 'bw' else {}
124138

125139
# Add any paths that contain custom themes here, relative to this directory.
126-
#html_theme_path = []
140+
html_theme_path = (['bw_sphinxtheme/bw_sphinxtheme/themes']
141+
if html_theme == 'bw'
142+
else [])
127143

128144
# The name for this set of Sphinx documents. If None, it defaults to
129145
# "<project> v<release> documentation".

0 commit comments

Comments
 (0)