|
11 | 11 | # All configuration values have a default; values that are commented out |
12 | 12 | # serve to show the default. |
13 | 13 |
|
14 | | -import sys, os |
| 14 | +import sys, os, sphinx |
| 15 | + |
| 16 | +readthedocs = os.environ.get('READTHEDOCS', None) == 'True' |
15 | 17 |
|
16 | 18 | # If extensions (or modules to document with autodoc) are in another directory, |
17 | 19 | # add these directories to sys.path here. If the directory is relative to the |
|
23 | 25 |
|
24 | 26 | # -- General configuration ----------------------------------------------------- |
25 | 27 |
|
26 | | -# If your documentation needs a minimal Sphinx version, state it here. |
27 | | -#needs_sphinx = '1.0' |
28 | | - |
29 | | -# Add any Sphinx extension module names here, as strings. They can be extensions |
30 | | -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
31 | | -extensions = ['sphinx.ext.intersphinx', 'djangodocs', 'github'] |
| 28 | +extensions = [ |
| 29 | + 'sphinx.ext.intersphinx', |
| 30 | + 'djangodocs', |
| 31 | + 'github' |
| 32 | +] |
32 | 33 | intersphinx_mapping = { |
33 | 34 | 'python': ('http://docs.python.org/2.7', None), |
34 | 35 | 'django': ('http://readthedocs.org/docs/django/en/latest/', None), |
35 | 36 | } |
36 | 37 |
|
37 | | -# Add any paths that contain templates here, relative to this directory. |
38 | 38 | templates_path = ['_templates'] |
39 | | - |
40 | | -# The suffix of source filenames. |
41 | 39 | source_suffix = '.rst' |
42 | | - |
43 | | -# The encoding of source files. |
44 | | -#source_encoding = 'utf-8-sig' |
45 | | - |
46 | | -# The master toctree document. |
| 40 | +exclude_patterns = ['_build'] |
47 | 41 | master_doc = 'index' |
48 | 42 |
|
49 | 43 | # General information about the project. |
50 | 44 | project = u'django-hvad' |
51 | 45 | copyright = u'2011-2015, Kristian Øllegaard, Jonas Obrist & contributors' |
52 | 46 |
|
53 | | -# The version info for the project you're documenting, acts as replacement for |
54 | | -# |version| and |release|, also used in various other places throughout the |
55 | | -# built documents. |
56 | | -# |
57 | | -# The short X.Y version. |
58 | 47 | version = '1.2' |
59 | | -# The full version, including alpha/beta/rc tags. |
60 | 48 | release = '1.2.0' |
61 | 49 |
|
62 | | -# The language for content autogenerated by Sphinx. Refer to documentation |
63 | | -# for a list of supported languages. |
64 | | -#language = None |
65 | | - |
66 | | -# There are two options for replacing |today|: either, you set today to some |
67 | | -# non-false value, then it is used: |
68 | | -#today = '' |
69 | | -# Else, today_fmt is used as the format for a strftime call. |
70 | | -#today_fmt = '%B %d, %Y' |
71 | | - |
72 | | -# List of patterns, relative to source directory, that match files and |
73 | | -# directories to ignore when looking for source files. |
74 | | -exclude_patterns = ['_build'] |
75 | | - |
76 | | -# The reST default role (used for this markup: `text`) to use for all documents. |
77 | | -#default_role = None |
78 | | - |
79 | | -# If true, '()' will be appended to :func: etc. cross-reference text. |
80 | | -#add_function_parentheses = True |
81 | | - |
82 | | -# If true, the current module name will be prepended to all description |
83 | | -# unit titles (such as .. function::). |
84 | | -#add_module_names = True |
85 | | - |
86 | | -# If true, sectionauthor and moduleauthor directives will be shown in the |
87 | | -# output. They are ignored by default. |
88 | | -#show_authors = False |
89 | 50 |
|
90 | 51 | # The name of the Pygments (syntax highlighting) style to use. |
91 | 52 | pygments_style = 'trac' |
92 | 53 |
|
93 | | -# A list of ignored prefixes for module index sorting. |
94 | | -#modindex_common_prefix = [] |
95 | | - |
96 | | - |
97 | 54 | # -- Options for HTML output --------------------------------------------------- |
98 | 55 |
|
99 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
100 | | -# a list of builtin themes. |
101 | | -html_theme = 'classic' |
102 | | - |
103 | | -# Theme options are theme-specific and customize the look and feel of a theme |
104 | | -# further. For a list of options available for each theme, see the |
105 | | -# documentation. |
| 56 | +if sphinx.version_info >= (1, 3): |
| 57 | + html_theme = 'default' if readthedocs else 'classic' |
| 58 | +else: |
| 59 | + html_theme = 'default' |
106 | 60 | html_theme_options = { |
107 | 61 | 'externalrefs': True, |
108 | 62 | } |
109 | 63 |
|
110 | 64 | html_style = 'stylesheet.css' |
111 | | - |
112 | | -# Add any paths that contain custom themes here, relative to this directory. |
113 | | -#html_theme_path = [] |
114 | | - |
115 | | -# The name for this set of Sphinx documents. If None, it defaults to |
116 | | -# "<project> v<release> documentation". |
117 | | -#html_title = None |
118 | | - |
119 | | -# A shorter title for the navigation bar. Default is the same as html_title. |
120 | | -#html_short_title = None |
121 | | - |
122 | | -# The name of an image file (relative to this directory) to place at the top |
123 | | -# of the sidebar. |
124 | | -#html_logo = None |
125 | | - |
126 | | -# The name of an image file (within the static path) to use as favicon of the |
127 | | -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
128 | | -# pixels large. |
129 | | -#html_favicon = None |
130 | | - |
131 | | -# Add any paths that contain custom static files (such as style sheets) here, |
132 | | -# relative to this directory. They are copied after the builtin static files, |
133 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
134 | 65 | html_static_path = ['_static'] |
135 | 66 |
|
136 | | -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
137 | | -# using the given strftime format. |
138 | | -#html_last_updated_fmt = '%b %d, %Y' |
139 | | - |
140 | | -# If true, SmartyPants will be used to convert quotes and dashes to |
141 | | -# typographically correct entities. |
142 | 67 | html_use_smartypants = True |
| 68 | +html_show_sourcelink = False |
143 | 69 |
|
144 | 70 | # Custom sidebar templates, maps document names to template names. |
145 | 71 | html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']} |
146 | 72 |
|
147 | | -# Additional templates that should be rendered to pages, maps page names to |
148 | | -# template names. |
149 | | -#html_additional_pages = {} |
150 | | - |
151 | | -# If false, no module index is generated. |
152 | | -#html_domain_indices = True |
153 | | - |
154 | | -# If false, no index is generated. |
155 | | -#html_use_index = True |
156 | | - |
157 | | -# If true, the index is split into individual pages for each letter. |
158 | | -#html_split_index = False |
159 | | - |
160 | | -# If true, links to the reST sources are added to the pages. |
161 | | -html_show_sourcelink = False |
162 | | - |
163 | | -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
164 | | -#html_show_sphinx = True |
165 | | - |
166 | | -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
167 | | -#html_show_copyright = True |
168 | | - |
169 | | -# If true, an OpenSearch description file will be output, and all pages will |
170 | | -# contain a <link> tag referring to it. The value of this option must be the |
171 | | -# base URL from which the finished HTML is served. |
172 | | -#html_use_opensearch = '' |
173 | | - |
174 | | -# This is the file name suffix for HTML files (e.g. ".xhtml"). |
175 | | -#html_file_suffix = None |
176 | 73 |
|
177 | 74 | # Output file base name for HTML help builder. |
178 | 75 | htmlhelp_basename = 'Projectdoc' |
|
193 | 90 | u'Jonas Obrist & contributors', 'manual'), |
194 | 91 | ] |
195 | 92 |
|
196 | | -# The name of an image file (relative to this directory) to place at the top of |
197 | | -# the title page. |
198 | | -#latex_logo = None |
199 | | - |
200 | | -# For "manual" documents, if this is true, then toplevel headings are parts, |
201 | | -# not chapters. |
202 | | -#latex_use_parts = False |
203 | | - |
204 | | -# If true, show page references after internal links. |
205 | | -#latex_show_pagerefs = False |
206 | | - |
207 | | -# If true, show URL addresses after external links. |
208 | | -#latex_show_urls = False |
209 | | - |
210 | | -# Additional stuff for the LaTeX preamble. |
211 | | -#latex_preamble = '' |
212 | | - |
213 | | -# Documents to append as an appendix to all manuals. |
214 | | -#latex_appendices = [] |
215 | | - |
216 | | -# If false, no module index is generated. |
217 | | -#latex_domain_indices = True |
218 | | - |
219 | 93 |
|
220 | 94 | # -- Options for manual page output -------------------------------------------- |
221 | 95 |
|
|
0 commit comments