Debian Codegraph @

cmake/tribits/doc/sphinx/users_guide/conf.py

raw
1 # Configuration file for the Sphinx documentation builder.
2 #
3 # This file only contains a selection of the most common options. For a full
4 # list see the documentation:
5 # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
7 # -- Path setup --------------------------------------------------------------
8
9 # If extensions (or modules to document with autodoc) are in another directory,
10 # add these directories to sys.path here. If the directory is relative to the
11 # documentation root, use os.path.abspath to make it absolute, like shown here.
12 #
13 import datetime
14 import os
15 import sys
16 sys.path.insert(0, os.path.abspath('.'))
17
18 # -- Project information -----------------------------------------------------
19
20 project = 'TriBITS'
21 copyright = f'{datetime.datetime.now().year}, Roscoe A. Bartlett'
22 author = 'Roscoe A. Bartlett'
23
24 # The full version, including alpha/beta/rc tags
25 doc_path = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-3])
26 git_ver = os.path.join(doc_path, 'build_ref', 'TribitsGitVersion.txt')
27 with open(git_ver, 'r') as git_file:
28 release = git_file.read().split('\n')[0]
29
30 # -- General configuration ---------------------------------------------------
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 = ['sphinx_rtd_theme']
36
37 # Add any paths that contain templates here, relative to this directory.
38 templates_path = ['_templates']
39
40 # List of patterns, relative to source directory, that match files and
41 # directories to ignore when looking for source files.
42 # This pattern also affects html_static_path and html_extra_path.
43 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
44
45
46 # -- Options for HTML output -------------------------------------------------
47
48 # The theme to use for HTML and HTML Help pages. See the documentation for
49 # a list of builtin themes.
50 #
51 html_theme = 'sphinx_rtd_theme'
52
53 html_theme_options = {
54 'logo_only': False,
55 'display_version': True,
56 'prev_next_buttons_location': 'bottom',
57 'style_external_links': True,
58 'vcs_pageview_mode': 'blob',
59 'style_nav_header_background': '#2980B9',
60 # Toc options
61 'collapse_navigation': False,
62 'sticky_navigation': True,
63 'navigation_depth': 4,
64 'includehidden': True,
65 'titles_only': False
66 }
67
68 # Add any paths that contain custom static files (such as style sheets) here,
69 # relative to this directory. They are copied after the builtin static files,
70 # so a file named "default.css" will overwrite the builtin "default.css".
71 html_static_path = ['_static']