Skip to content

Commit 7dda6be

Browse files
authored
Merge pull request #498 from FriendsOfSymfony/cleanup-rtd-build
align doc setup with library
2 parents 9f5129c + 67a3276 commit 7dda6be

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Resources/doc/conf.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
# -*- coding: utf-8 -*-
33
#
44

5-
import sys, os, sphinx_rtd_theme
5+
import sys, os
66
from sphinx.highlighting import lexers
77
from pygments.lexers.web import PhpLexer
88

99
lexers['php'] = PhpLexer(startinline=True, linenos=1)
10-
primary_domain = 'php'
1110

11+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
12+
if not on_rtd: # only import and set the theme if we're building docs locally
13+
import sphinx_rtd_theme
14+
html_theme = 'sphinx_rtd_theme'
15+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
16+
17+
primary_domain = 'php'
1218
highlight_language = 'php'
1319

1420
# If extensions (or modules to document with autodoc) are in another directory,
@@ -25,8 +31,6 @@
2531
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2632
extensions = [
2733
'sphinx.ext.intersphinx',
28-
'sphinx.ext.coverage',
29-
'sphinx.ext.todo',
3034
'sphinxcontrib.phpdomain',
3135
'sensio.sphinx.configurationblock',
3236
'sensio.sphinx.phpcode',
@@ -99,24 +103,21 @@
99103

100104
# -- Options for HTML output ---------------------------------------------------
101105

102-
# The theme to use for HTML and HTML Help pages. See the documentation for
103-
# a list of builtin themes.
104-
html_theme = 'sphinx_rtd_theme'
105-
106106
# Theme options are theme-specific and customize the look and feel of a theme
107107
# further. For a list of options available for each theme, see the
108108
# documentation.
109109
#html_theme_options = {}
110110

111111
# Add any paths that contain custom themes here, relative to this directory.
112-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
112+
#html_theme_path = []
113113

114114
# The name for this set of Sphinx documents. If None, it defaults to
115115
# "<project> v<release> documentation".
116-
#html_title = None
116+
# Don't show version in title
117+
html_title = "FOSHttpCacheBundle Documentation"
117118

118119
# A shorter title for the navigation bar. Default is the same as html_title.
119-
#html_short_title = None
120+
html_short_title = "FOSHttpCacheBundle"
120121

121122
# The name of an image file (relative to this directory) to place at the top
122123
# of the sidebar.

0 commit comments

Comments
 (0)