1 # -*- coding: utf-8 -*-
6 import sphinx_rtd_theme
8 sphinx_rtd_theme
= None
10 # Add the cola source directory to sys.path
11 docdir
= os
.path
.abspath(os
.path
.realpath(__file__
))
12 srcdir
= os
.path
.dirname(os
.path
.dirname(docdir
))
13 extrasdir
= os
.path
.join(srcdir
, 'extras')
14 sys
.path
.insert(1, extrasdir
)
20 'sphinx.ext.coverage',
22 # https://github.com/git-cola/git-cola/issues/1250
23 # https://github.com/jaraco/jaraco.packaging/issues/7
24 # 'jaraco.packaging.sphinx',
25 # Python 3.11 https://github.com/git-cola/git-cola/issues/1251
29 extensions
.append('sphinx_rtd_theme')
31 # package_url is inject py jaraco.packaging.sphinx when available.
32 package_url
= 'https://github.com/git-cola/git-cola'
34 templates_path
= ['_templates']
35 source_suffix
= '.rst'
36 source_encoding
= 'utf-8'
40 copyright
= '2007-2022, David Aguilar and contributors'
41 authors
= 'David Aguilar and contributors'
43 versionfile
= os
.path
.join(srcdir
, 'cola', '_version.py')
45 with
open(versionfile
) as f
:
48 # The short X.Y version.
49 version
= scope
['VERSION']
50 # The full version, including alpha/beta/rc tags.
53 exclude_trees
= ['_build']
54 add_function_parentheses
= True
55 pygments_style
= 'default'
58 html_theme
= 'sphinx_rtd_theme'
59 html_theme_path
= ['_themes']
60 html_static_path
= ['_static']
61 html_show_sourcelink
= True
62 htmlhelp_basename
= 'git-cola-doc'
65 ('git-cola', 'git-cola', 'The highly caffeinated Git GUI', authors
, '1'),
66 ('git-dag', 'git-dag', 'The sleek and powerful Git history browser', authors
, '1'),
69 # Sphinx 4.0 creates sub-directories for each man section.
70 # Disable this feature for consistency across Sphinx versions.
71 man_make_section_directory
= False
77 'git-cola Documentation',
78 'David Aguilar and contributors',
83 # Example configuration for intersphinx: refer to the Python standard library.
84 intersphinx_mapping
= {'https://docs.python.org/3': None}
87 '../CHANGES.rst': dict(
88 using
=dict(GH
='https://github.com'),
91 pattern
=r
'(Issue #|\B#)(?P<issue>\d+)',
92 url
='%s/issues/{issue}' % package_url
,
95 pattern
=r
'\B\+(?P<pull>\d+)',
96 url
='%s/pull/{pull}' % package_url
,
99 pattern
=r
'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
100 with_scm
='{text}\n{rev[timestamp]:%d %b %Y}\n',
103 pattern
=r
'PEP[- ](?P<pep_number>\d+)',
104 url
='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',