Peter Hormanns
2022-03-31 7d14875daff6c9be8a87106da14119265e06e4cc
commit | author | age
8d081a 1
0a126d 2 # Configuration file for the Sphinx documentation builder.
JUH 3 #
4 # This file only contains a selection of the most common options. For a full
5 # list see the documentation:
6 # https://www.sphinx-doc.org/en/master/usage/configuration.html
7
8 # -- Path setup --------------------------------------------------------------
9
10 # If extensions (or modules to document with autodoc) are in another directory,
11 # add these directories to sys.path here. If the directory is relative to the
12 # documentation root, use os.path.abspath to make it absolute, like shown here.
13 #
14 # import os
15 # import sys
16 # sys.path.insert(0, os.path.abspath('.'))
17
18 import datetime
19 import os
20 import sys
21 from subprocess import check_output
22 import sphinx_rtd_theme
23
939940 24 changesetid = check_output(["git", "rev-parse", "--short", "HEAD"]).decode("utf-8")[:7]
JUH 25
26 numfig = True
27 numfig_secnum_depth = 3
28 math_numfig = False
0a126d 29
JUH 30 # -- Project information -----------------------------------------------------
31
15e740 32 project = 'Benutzerhandbuch'
0a126d 33 copyright = '2019, Hostsharing eG'
JUH 34 author = 'Hostsharing eG'
35
36 # The full version, including alpha/beta/rc tags
607050 37 release = changesetid
0a126d 38
JUH 39
40 # -- General configuration ---------------------------------------------------
41
42 # Add any Sphinx extension module names here, as strings. They can be
43 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44 # ones.
45 extensions = [
786c9f 46     'sphinx.ext.todo',
c5e3c3 47     'sphinx.ext.graphviz',
D 48     'hs.theme.sphinx'
0a126d 49 ]
786c9f 50
d545d3 51 todo_include_todos = False
0a126d 52
JUH 53 # Add any paths that contain templates here, relative to this directory.
54 templates_path = ['_templates']
55
56 # The language for content autogenerated by Sphinx. Refer to documentation
57 # for a list of supported languages.
58 #
59 # This is also used if you do content translation via gettext catalogs.
60 # Usually you set "language" from the command line for these cases.
61 language = 'de'
62
63 # List of patterns, relative to source directory, that match files and
64 # directories to ignore when looking for source files.
65 # This pattern also affects html_static_path and html_extra_path.
66 exclude_patterns = []
67
68
69 # -- Options for HTML output -------------------------------------------------
70
71 # The theme to use for HTML and HTML Help pages.  See the documentation for
72 # a list of builtin themes.
73 #
c5e3c3 74 html_theme = 'hostsharing'
607050 75 html_theme_options = {
JUH 76     'logo_only': False,
77     'display_version': True,
78     'style_external_links': True,
79     'style_nav_header_background': '#4279bc',
80 }
0a126d 81 # Add any paths that contain custom static files (such as style sheets) here,
JUH 82 # relative to this directory. They are copied after the builtin static files,
83 # so a file named "default.css" will overwrite the builtin "default.css".
84 html_static_path = ['_static']
4486d5 85 html_extra_path = ['_static/robots.txt']
607050 86 html_logo = 'images/logos/hostsharing-logo-negativ.svg'
15e740 87 latex_logo = '_static/logo.png'
607050 88 #latex_basename = 'Hostsharing-Benutzerhandbuch-%s.tex' % changesetid
JUH 89 latex_basename = 'Hostsharing-Benutzerhandbuch.tex'
0a126d 90
JUH 91 latex_engine = 'lualatex'
92
93 latex_elements = {
94     'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
95     'fontpkg': r'''
939940 96         \setmainfont{TeX Gyre Heros}%
0a126d 97         \setsansfont{TeX Gyre Heros}%
JUH 98 %        \setmonofont[RawFeature=-tlig]{TeX Gyre Cursor}%
0b3904 99         \setmonofont[Ligatures={NoRequired, NoCommon, NoContextual}]{TeX Gyre Cursor}
JUH 100 %        \setmonofont{Courier New}[Scale=MatchLowercase,ScaleAgain=0.9]
0a126d 101         ''',
939940 102     'preamble': r'\input{./mystyle.sty}',
0a126d 103     'releasename': 'Version',
JUH 104     'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
105     'printindex': r'\footnotesize\raggedright\printindex',
939940 106     'maketitle' : r'\newcommand\sphinxbackoftitlepage{\vspace*{\fill}\noindent Herausgeber: \par Hostsharing eG \par Flughafenstraße 52a \par 22335 Hamburg}\sphinxmaketitle',
0a126d 107     'sphinxsetup': r'''
JUH 108          verbatimwithframe=false,
109          VerbatimColor={cmyk}{0,0,0,0.1},
110          VerbatimHighlightColor={cmyk}{0,0,0,0},
111          TitleColor={named}{Black},
112          hintBorderColor={named}{Grey},
113          attentionborder=2pt,
114          attentionBorderColor={named}{Grey},
115          attentionBgColor={cmyk}{0,0,0,0.1},
116          noteborder=2pt,
117          noteBorderColor={named}{Grey},
118          cautionborder=2pt,
119          cautionBorderColor={named}{Grey},
120          cautionBgColor={cmyk}{0,0,0,0.1},
121          InnerLinkColor={named}{Black},
122          OuterLinkColor={named}{Black},
123          shadowsize=3pt,
124          verbatimcontinuedalign=l,
125          verbatimcontinuesalign=r
126 ''',
127    'fvset': r'\fvset{fontsize=\footnotesize}',
128 }
129
939940 130 latex_additional_files = ['mystyle.sty']
JUH 131
132 latex_docclass = {'manual': 'book',}
133 latex_show_pagerefs = True
134 latex_show_urls = 'footnote'
135 latex_use_xindy = False
136
786c9f 137 latex_documents = [
15e740 138     ('index', latex_basename, project,
JUH 139      author, 'manual'),
786c9f 140     ]
JUH 141
0a126d 142 def setup(app):
JUH 143     app.add_object_type('role', 'role',
144     objname='Rolle',
145     indextemplate='pair: %s; Rolle')
607050 146
JUH 147 rst_epilog = '.. |changesetid| replace:: %s' % changesetid