Merge branch 'maint'
[git-cola.git] / share / doc / git-cola / conf.py
blobac5be2ee6e1a8c0e6a4a8fc67b90891182d041f4
1 # -*- coding: utf-8 -*-
2 import os
3 import sys
5 try:
6 import sphinx_rtd_theme
7 except ImportError:
8 sphinx_rtd_theme = None
10 # Add the cola source directory to sys.path
11 abspath = os.path.abspath(os.path.realpath(__file__))
12 docdir = os.path.dirname(os.path.dirname(abspath))
13 srcdir = os.path.dirname(os.path.dirname(docdir))
14 extrasdir = os.path.join(srcdir, 'extras')
15 sys.path.insert(1, extrasdir)
17 extensions = [
18 'sphinx.ext.autodoc',
19 'sphinx.ext.doctest',
20 'sphinx.ext.todo',
21 'sphinx.ext.coverage',
22 'sphinxtogithub',
24 if sphinx_rtd_theme:
25 extensions.append('sphinx_rtd_theme')
27 templates_path = ['_templates']
28 source_suffix = '.rst'
29 source_encoding = 'utf-8'
30 master_doc = 'index'
32 project = 'git-cola'
33 copyright = '2007-2020, David Aguilar and contributors'
34 authors = 'David Aguilar and contributors'
36 versionfile = os.path.join(srcdir, 'cola', '_version.py')
37 scope = {}
38 with open(versionfile) as f:
39 exec (f.read(), scope)
41 # The short X.Y version.
42 version = scope['VERSION']
43 # The full version, including alpha/beta/rc tags.
44 release = version
46 exclude_trees = ['_build']
47 add_function_parentheses = True
48 pygments_style = 'default'
50 if sphinx_rtd_theme:
51 html_theme = 'sphinx_rtd_theme'
52 html_theme_path = ['_themes']
53 html_static_path = ['_static']
54 html_show_sourcelink = True
55 htmlhelp_basename = 'git-cola-doc'
57 man_pages = [
58 ('git-cola', 'git-cola', 'The highly caffeinated Git GUI', authors, '1'),
59 ('git-dag', 'git-dag', 'The sleek and powerful Git history browser', authors, '1'),
62 # Sphinx 4.0 creates sub-directories for each man section.
63 # Disable this feature for consistency across Sphinx versions.
64 man_make_section_directory = False
66 latex_documents = [
68 'index',
69 'git-cola.tex',
70 'git-cola Documentation',
71 'David Aguilar and contributors',
72 'manual',