Issue 014: Change theme to Read the Docs Sphinx Theme
[kohadocs.git] / source / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Koha Manual documentation build configuration file, created by
5 # sphinx-quickstart on Fri Nov  4 10:07:13 2016.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 # import os
21 import sys; sys.setrecursionlimit(3000)
22 import sphinx_rtd_theme
23 # import sys
24 # sys.path.insert(0, os.path.abspath('.'))
25
26 # -- General configuration ------------------------------------------------
27
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #
30 # needs_sphinx = '1.0'
31
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = [
36     'sphinx.ext.autodoc',
37     'sphinx.ext.doctest',
38     'sphinx.ext.intersphinx',
39     'sphinx.ext.coverage',
40     'sphinxcontrib.spelling',
41     'sphinx.ext.autosectionlabel',
42     'sphinx_rtd_theme',
43 ]
44
45 # Spelling options
46 spelling_lang='en_US'
47 spelling_word_list_filename='koha_spelling_wordlist.txt'
48
49 # Add any paths that contain templates here, relative to this directory.
50 templates_path = ['_templates']
51
52 # The suffix(es) of source filenames.
53 # You can specify multiple suffix as a list of string:
54 #
55 # source_suffix = ['.rst', '.md']
56 source_suffix = '.rst'
57
58 # The encoding of source files.
59 #
60 # source_encoding = 'utf-8-sig'
61
62 # The master toctree document.
63 master_doc = 'index'
64
65 # General information about the project.
66 project = 'Koha Manual'
67 copyright = '2020, Koha Community'
68 author = 'Koha Community'
69
70 # The version info for the project you're documenting, acts as replacement for
71 # |version| and |release|, also used in various other places throughout the
72 # built documents.
73 #
74 # The short X.Y version.
75 version = '20.11'
76 # The full version, including alpha/beta/rc tags.
77 release = '20.11'
78
79 # The language for content autogenerated by Sphinx. Refer to documentation
80 # for a list of supported languages.
81 #
82 # This is also used if you do content translation via gettext catalogs.
83 # Usually you set "language" from the command line for these cases.
84 language = None
85
86 # There are two options for replacing |today|: either, you set today to some
87 # non-false value, then it is used:
88 #
89 # today = ''
90 #
91 # Else, today_fmt is used as the format for a strftime call.
92 #
93 # today_fmt = '%B %d, %Y'
94
95 # List of patterns, relative to source directory, that match files and
96 # directories to ignore when looking for source files.
97 # This patterns also effect to html_static_path and html_extra_path
98 exclude_patterns = []
99
100 # The reST default role (used for this markup: `text`) to use for all
101 # documents.
102 #
103 # default_role = None
104
105 # If true, '()' will be appended to :func: etc. cross-reference text.
106 #
107 # add_function_parentheses = True
108
109 # If true, the current module name will be prepended to all description
110 # unit titles (such as .. function::).
111 #
112 # add_module_names = True
113
114 # If true, sectionauthor and moduleauthor directives will be shown in the
115 # output. They are ignored by default.
116 #
117 # show_authors = False
118
119 # The name of the Pygments (syntax highlighting) style to use.
120 pygments_style = 'sphinx'
121
122 # A list of ignored prefixes for module index sorting.
123 # modindex_common_prefix = []
124
125 # If true, keep warnings as "system message" paragraphs in the built documents.
126 # keep_warnings = False
127
128 # If true, `todo` and `todoList` produce output, else they produce nothing.
129 todo_include_todos = False
130
131
132 # -- Options for HTML output ----------------------------------------------
133
134 # The theme to use for HTML and HTML Help pages.  See the documentation for
135 # a list of builtin themes.
136 #
137 html_theme = 'sphinx_rtd_theme'
138
139 # Theme options are theme-specific and customize the look and feel of a theme
140 # further.  For a list of options available for each theme, see the
141 # documentation.
142 #
143 html_theme_options = {
144
145     'prev_next_buttons_location': 'both',
146     'style_nav_header_background': '#4a9b32'
147
148 }
149
150 # Add any paths that contain custom themes here, relative to this directory.
151 # html_theme_path = []
152
153 # The name for this set of Sphinx documents.
154 # "<project> v<release> documentation" by default.
155 #
156 # html_title = 'Koha Manual v17.05'
157
158 # A shorter title for the navigation bar.  Default is the same as html_title.
159 #
160 # html_short_title = None
161
162 # The name of an image file (relative to this directory) to place at the top
163 # of the sidebar.
164 #
165 # html_logo = None
166
167 # The name of an image file (relative to this directory) to use as a favicon of
168 # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
169 # pixels large.
170 #
171 # html_favicon = None
172
173 # Add any paths that contain custom static files (such as style sheets) here,
174 # relative to this directory. They are copied after the builtin static files,
175 # so a file named "default.css" will overwrite the builtin "default.css".
176 html_static_path = ['_static']
177
178 # Add any extra paths that contain custom files (such as robots.txt or
179 # .htaccess) here, relative to this directory. These files are copied
180 # directly to the root of the documentation.
181 #
182 # html_extra_path = []
183
184 # If not None, a 'Last updated on:' timestamp is inserted at every page
185 # bottom, using the given strftime format.
186 # The empty string is equivalent to '%b %d, %Y'.
187 #
188 html_last_updated_fmt = '%Y-%m-%d %H:%M:%S'
189
190 # If true, SmartyPants will be used to convert quotes and dashes to
191 # typographically correct entities.
192 #
193 # html_use_smartypants = True
194
195 # Custom sidebar templates, maps document names to template names.
196 #
197 # html_sidebars = {}
198
199 # Additional templates that should be rendered to pages, maps page names to
200 # template names.
201 #
202 # html_additional_pages = {}
203
204 # If false, no module index is generated.
205 #
206 # html_domain_indices = True
207
208 # If false, no index is generated.
209 #
210 # html_use_index = True
211
212 # If true, the index is split into individual pages for each letter.
213 #
214 # html_split_index = False
215
216 # If true, links to the reST sources are added to the pages.
217 #
218 # html_show_sourcelink = True
219
220 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
221 #
222 # html_show_sphinx = True
223
224 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
225 #
226 # html_show_copyright = True
227
228 # If true, an OpenSearch description file will be output, and all pages will
229 # contain a <link> tag referring to it.  The value of this option must be the
230 # base URL from which the finished HTML is served.
231 #
232 # html_use_opensearch = ''
233
234 # This is the file name suffix for HTML files (e.g. ".xhtml").
235 # html_file_suffix = None
236
237 # Language to be used for generating the HTML full-text search index.
238 # Sphinx supports the following languages:
239 #   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
240 #   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
241 #
242 # html_search_language = 'en'
243
244 # A dictionary with options for the search language support, empty by default.
245 # 'ja' uses this config value.
246 # 'zh' user can custom change `jieba` dictionary path.
247 #
248 # html_search_options = {'type': 'default'}
249
250 # The name of a javascript file (relative to the configuration directory) that
251 # implements a search results scorer. If empty, the default will be used.
252 #
253 # html_search_scorer = 'scorer.js'
254
255 # Output file base name for HTML help builder.
256 htmlhelp_basename = 'KohaManualdoc'
257
258 # -- Options for LaTeX output ---------------------------------------------
259
260 latex_elements = {
261      # The paper size ('letterpaper' or 'a4paper').
262      #
263      # 'papersize': 'letterpaper',
264
265      # The font size ('10pt', '11pt' or '12pt').
266      #
267      # 'pointsize': '10pt',
268
269      # Additional stuff for the LaTeX preamble.
270      #
271      # 'preamble': '',
272
273      # Latex figure (float) alignment
274      #
275      # 'figure_align': 'htbp',
276 }
277
278 # Grouping the document tree into LaTeX files. List of tuples
279 # (source start file, target name, title,
280 #  author, documentclass [howto, manual, or own class]).
281 latex_documents = [
282     (master_doc, 'KohaManual.tex', 'Koha Manual Documentation',
283      'Koha Community', 'manual'),
284 ]
285
286 # The name of an image file (relative to this directory) to place at the top of
287 # the title page.
288 #
289 # latex_logo = None
290
291 # For "manual" documents, if this is true, then toplevel headings are parts,
292 # not chapters.
293 #
294 # latex_use_parts = False
295
296 # If true, show page references after internal links.
297 #
298 # latex_show_pagerefs = False
299
300 # If true, show URL addresses after external links.
301 #
302 # latex_show_urls = False
303
304 # Documents to append as an appendix to all manuals.
305 #
306 # latex_appendices = []
307
308 # It false, will not define \strong, \code,     itleref, \crossref ... but only
309 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
310 # packages.
311 #
312 # latex_keep_old_macro_names = True
313
314 # If false, no module index is generated.
315 #
316 # latex_domain_indices = True
317
318
319 # -- Options for manual page output ---------------------------------------
320
321 # One entry per manual page. List of tuples
322 # (source start file, name, description, authors, manual section).
323 man_pages = [
324     (master_doc, 'kohamanual', 'Koha Manual Documentation',
325      [author], 1)
326 ]
327
328 # If true, show URL addresses after external links.
329 #
330 # man_show_urls = False
331
332
333 # -- Options for Texinfo output -------------------------------------------
334
335 # Grouping the document tree into Texinfo files. List of tuples
336 # (source start file, target name, title, author,
337 #  dir menu entry, description, category)
338 texinfo_documents = [
339     (master_doc, 'KohaManual', 'Koha Manual Documentation',
340      author, 'KohaManual', 'One line description of project.',
341      'Miscellaneous'),
342 ]
343
344 # Documents to append as an appendix to all manuals.
345 #
346 # texinfo_appendices = []
347
348 # If false, no module index is generated.
349 #
350 # texinfo_domain_indices = True
351
352 # How to display URL addresses: 'footnote', 'no', or 'inline'.
353 #
354 # texinfo_show_urls = 'footnote'
355
356 # If true, do not generate a @detailmenu in the "Top" node's menu.
357 #
358 # texinfo_no_detailmenu = False
359
360
361 # -- Options for Epub output ----------------------------------------------
362
363 # Bibliographic Dublin Core info.
364 epub_title = project
365 epub_author = author
366 epub_publisher = author
367 epub_copyright = copyright
368
369 # The basename for the epub file. It defaults to the project name.
370 # epub_basename = project
371
372 # The HTML theme for the epub output. Since the default themes are not
373 # optimized for small screen space, using the same theme for HTML and epub
374 # output is usually not wise. This defaults to 'epub', a theme designed to save
375 # visual space.
376 #
377 # epub_theme = 'epub'
378
379 # The language of the text. It defaults to the language option
380 # or 'en' if the language is not set.
381 #
382 # epub_language = ''
383
384 # The scheme of the identifier. Typical schemes are ISBN or URL.
385 # epub_scheme = ''
386
387 # The unique identifier of the text. This can be a ISBN number
388 # or the project homepage.
389 #
390 # epub_identifier = ''
391
392 # A unique identification for the text.
393 #
394 # epub_uid = ''
395
396 # A tuple containing the cover image and cover page html template filenames.
397 #
398 # epub_cover = ()
399
400 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
401 #
402 # epub_guide = ()
403
404 # HTML files that should be inserted before the pages created by sphinx.
405 # The format is a list of tuples containing the path and title.
406 #
407 # epub_pre_files = []
408
409 # HTML files that should be inserted after the pages created by sphinx.
410 # The format is a list of tuples containing the path and title.
411 #
412 # epub_post_files = []
413
414 # A list of files that should not be packed into the epub file.
415 epub_exclude_files = ['search.html']
416
417 # The depth of the table of contents in toc.ncx.
418 #
419 # epub_tocdepth = 3
420
421 # Allow duplicate toc entries.
422 #
423 # epub_tocdup = True
424
425 # Choose between 'default' and 'includehidden'.
426 #
427 # epub_tocscope = 'default'
428
429 # Fix unsupported image types using the Pillow.
430 #
431 # epub_fix_images = False
432
433 # Scale large images.
434 #
435 # epub_max_image_width = 0
436
437 # How to display URL addresses: 'footnote', 'no', or 'inline'.
438 #
439 # epub_show_urls = 'inline'
440
441 # If false, no index is generated.
442 #
443 # epub_use_index = True
444
445
446 # Example configuration for intersphinx: refer to the Python standard library.
447 intersphinx_mapping = {'https://docs.python.org/': None}
448
449 locale_dirs = ['../locales/']
450
451 # Remove blank pages
452 # https://evolvingweb.ca/blog/writing-documentation-restructured-text-and-sphinx
453 latex_elements = {
454   'classoptions': ',oneside',
455   'babel': '\\usepackage[english]{babel}'
456 }