|
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 | # |
4 | 4 |
|
5 | | -import sys, os, sphinx_rtd_theme |
| 5 | +import sys, os |
6 | 6 | from sphinx.highlighting import lexers |
7 | 7 | from pygments.lexers.web import PhpLexer |
8 | 8 |
|
9 | 9 | lexers['php'] = PhpLexer(startinline=True, linenos=1) |
10 | | -primary_domain = 'php' |
11 | 10 |
|
| 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' |
12 | 18 | highlight_language = 'php' |
13 | 19 |
|
14 | 20 | # If extensions (or modules to document with autodoc) are in another directory, |
|
25 | 31 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
26 | 32 | extensions = [ |
27 | 33 | 'sphinx.ext.intersphinx', |
28 | | - 'sphinx.ext.coverage', |
29 | | - 'sphinx.ext.todo', |
30 | 34 | 'sphinxcontrib.phpdomain', |
31 | 35 | 'sensio.sphinx.configurationblock', |
32 | 36 | 'sensio.sphinx.phpcode', |
|
99 | 103 |
|
100 | 104 | # -- Options for HTML output --------------------------------------------------- |
101 | 105 |
|
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 | | - |
106 | 106 | # Theme options are theme-specific and customize the look and feel of a theme |
107 | 107 | # further. For a list of options available for each theme, see the |
108 | 108 | # documentation. |
109 | 109 | #html_theme_options = {} |
110 | 110 |
|
111 | 111 | # 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 = [] |
113 | 113 |
|
114 | 114 | # The name for this set of Sphinx documents. If None, it defaults to |
115 | 115 | # "<project> v<release> documentation". |
116 | | -#html_title = None |
| 116 | +# Don't show version in title |
| 117 | +html_title = "FOSHttpCacheBundle Documentation" |
117 | 118 |
|
118 | 119 | # A shorter title for the navigation bar. Default is the same as html_title. |
119 | | -#html_short_title = None |
| 120 | +html_short_title = "FOSHttpCacheBundle" |
120 | 121 |
|
121 | 122 | # The name of an image file (relative to this directory) to place at the top |
122 | 123 | # of the sidebar. |
|
0 commit comments