]> git.proxmox.com Git - ceph.git/blame - ceph/doc/conf.py
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / doc / conf.py
CommitLineData
7c673cae
FG
1import sys
2import os
3
4project = u'Ceph'
94b18763 5copyright = u'2016, Red Hat, Inc, and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)'
7c673cae
FG
6version = 'dev'
7release = 'dev'
8
9templates_path = ['_templates']
10source_suffix = '.rst'
11master_doc = 'index'
11fdf7f2 12exclude_patterns = ['**/.#*', '**/*~', 'start/quick-common.rst', '**/*.inc.rst']
7c673cae 13if tags.has('man'):
11fdf7f2
TL
14 master_doc = 'man_index'
15 exclude_patterns += ['index.rst', 'architecture.rst', 'glossary.rst', 'release*.rst',
7c673cae
FG
16 'api/*',
17 'cephfs/*',
18 'dev/*',
11fdf7f2 19 'governance.rst',
7c673cae
FG
20 'install/*',
21 'mon/*',
22 'rados/*',
b5b8bbf5
FG
23 'mgr/*',
24 'ceph-volume/*',
7c673cae
FG
25 'radosgw/*',
26 'rbd/*',
11fdf7f2
TL
27 'start/*',
28 'releases/*']
29else:
30 exclude_patterns += ['man_index.rst']
7c673cae
FG
31
32pygments_style = 'sphinx'
33
34html_theme = 'ceph'
35html_theme_path = ['_themes']
36html_title = "Ceph Documentation"
37html_logo = 'logo.png'
38html_favicon = 'favicon.ico'
7c673cae 39html_show_sphinx = False
f64942e4 40html_static_path = ["_static"]
7c673cae
FG
41html_sidebars = {
42 '**': ['smarttoc.html', 'searchbox.html'],
43 }
44
f64942e4
AA
45sys.path.insert(0, os.path.abspath('_ext'))
46
7c673cae
FG
47extensions = [
48 'sphinx.ext.autodoc',
49 'sphinx.ext.graphviz',
50 'sphinx.ext.todo',
3efd9988 51 'sphinxcontrib.ditaa',
7c673cae 52 'breathe',
f64942e4 53 'edit_on_github',
11fdf7f2 54 'ceph_releases',
7c673cae 55 ]
3efd9988 56ditaa = 'ditaa'
7c673cae
FG
57todo_include_todos = True
58
59top_level = os.path.dirname(
60 os.path.dirname(
61 os.path.abspath(__file__)
62 )
63)
64
65breathe_default_project = "Ceph"
66# see $(top_srcdir)/Doxyfile
67
68breathe_build_directory = os.path.join(top_level, "build-doc")
69breathe_projects = {"Ceph": os.path.join(top_level, breathe_build_directory)}
70breathe_projects_source = {
71 "Ceph": (os.path.join(top_level, "src/include/rados"),
72 ["rados_types.h", "librados.h"])
73}
74breathe_domain_by_extension = {'py': 'py', 'c': 'c', 'h': 'c', 'cc': 'cxx', 'hpp': 'cxx'}
f64942e4
AA
75
76# the docs are rendered with github links pointing to master. the javascript
77# snippet in _static/ceph.js rewrites the edit links when a page is loaded, to
78# point to the correct branch.
79edit_on_github_project = 'ceph/ceph'
80edit_on_github_branch = 'master'
81
82# handles edit-on-github and old version warning display
83def setup(app):
84 app.add_javascript('js/ceph.js')
11fdf7f2
TL
85
86# mocking ceph_module offered by ceph-mgr. `ceph_module` is required by
87# mgr.mgr_module
88class Dummy(object):
89 def __getattr__(self, _):
90 return lambda *args, **kwargs: None
91
92class Mock(object):
93 __all__ = []
94 def __init__(self, *args, **kwargs):
95 pass
96
97 def __call__(self, *args, **kwargs):
98 return Mock()
99
100 @classmethod
101 def __getattr__(cls, name):
102 mock = type(name, (Dummy,), {})
103 mock.__module__ = __name__
104 return mock
105
106sys.modules['ceph_module'] = Mock()
107
108for pybind in [os.path.join(top_level, 'src/pybind'),
109 os.path.join(top_level, 'src/pybind/mgr')]:
110 if pybind not in sys.path:
111 sys.path.insert(0, pybind)