Jan Ulrich Hasecke
2021-04-19 f944f0e623137cf123f8793c6ad3e76033f9139d
commit | author | age
a21066 1
JUH 2 # Configuration file for the Sphinx documentation builder.
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
24 changesetid = check_output(["git", "rev-parse", "--short", "HEAD"]).decode("utf-8")[:7]
25
26 numfig = True
27 numfig_secnum_depth = 3
28 math_numfig = False
29
30 # -- Project information -----------------------------------------------------
31
32 project = 'Benutzerhandbuch'
33 copyright = '2019, Hostsharing eG'
34 author = 'Hostsharing eG'
35
36 # The full version, including alpha/beta/rc tags
37 release = changesetid
38
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 = [
46     'sphinx.ext.todo',
47     'sphinx.ext.graphviz',
48 ]
49
50 todo_include_todos = False
51
52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ['_templates']
54
55 # The language for content autogenerated by Sphinx. Refer to documentation
56 # for a list of supported languages.
57 #
58 # This is also used if you do content translation via gettext catalogs.
59 # Usually you set "language" from the command line for these cases.
60 language = 'de'
61
62 # List of patterns, relative to source directory, that match files and
63 # directories to ignore when looking for source files.
64 # This pattern also affects html_static_path and html_extra_path.
65 exclude_patterns = []
66
67
68 # -- Options for HTML output -------------------------------------------------
69
70 # The theme to use for HTML and HTML Help pages.  See the documentation for
71 # a list of builtin themes.
72 #
73 html_theme = 'sphinx_rtd_theme'
74 # html_theme_options = {
75 #    'logo_only': False,
76 #    'display_version': True,
77 #    'style_external_links': True,
78 #    'style_nav_header_background': '#4279bc',
79 #}
80 # Add any paths that contain custom static files (such as style sheets) here,
81 # relative to this directory. They are copied after the builtin static files,
82 # so a file named "default.css" will overwrite the builtin "default.css".
83 html_static_path = ['../source/_static']
b130b5 84 #html_extra_path = ['../source/_static/robots.txt']
a21066 85 html_logo = '../source/images/logos/hostsharing-logo-negativ.svg'
JUH 86 latex_logo = '../source/_static/logo.png'
87 #latex_basename = 'Hostsharing-Benutzerhandbuch-%s.tex' % changesetid
88 latex_basename = 'Hostsharing-Benutzerhandbuch.tex'
89
90 latex_engine = 'lualatex'
91
92 latex_elements = {
93     'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
94     'fontpkg': r'''
95         \setmainfont{TeX Gyre Heros}%
96         \setsansfont{TeX Gyre Heros}%
97 %        \setmonofont[RawFeature=-tlig]{TeX Gyre Cursor}%
98         \setmonofont[Ligatures={NoRequired, NoCommon, NoContextual}]{TeX Gyre Cursor}
99 %        \setmonofont{Courier New}[Scale=MatchLowercase,ScaleAgain=0.9]
100         ''',
101     'preamble': r'\input{./mystyle.sty}',
102     'releasename': 'Version',
103     'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
104     'printindex': r'\footnotesize\raggedright\printindex',
105     'maketitle' : r'\newcommand\sphinxbackoftitlepage{\vspace*{\fill}\noindent Herausgeber: \par Hostsharing eG \par Flughafenstraße 52a \par 22335 Hamburg}\sphinxmaketitle',
106     'sphinxsetup': r'''
107          verbatimwithframe=false,
108          VerbatimColor={cmyk}{0,0,0,0.1},
109          VerbatimHighlightColor={cmyk}{0,0,0,0},
110          TitleColor={named}{Black},
111          hintBorderColor={named}{Grey},
112          attentionborder=2pt,
113          attentionBorderColor={named}{Grey},
114          attentionBgColor={cmyk}{0,0,0,0.1},
115          noteborder=2pt,
116          noteBorderColor={named}{Grey},
117          cautionborder=2pt,
118          cautionBorderColor={named}{Grey},
119          cautionBgColor={cmyk}{0,0,0,0.1},
120          InnerLinkColor={named}{Black},
121          OuterLinkColor={named}{Black},
122          shadowsize=3pt,
123          verbatimcontinuedalign=l,
124          verbatimcontinuesalign=r
125 ''',
126    'fvset': r'\fvset{fontsize=\footnotesize}',
127 }
128
129 latex_additional_files = ['mystyle.sty']
130
131 latex_docclass = {'manual': 'book',}
132 latex_show_pagerefs = True
133 latex_show_urls = 'footnote'
134 latex_use_xindy = False
135
136 latex_documents = [
137     ('index', latex_basename, project,
138      author, 'manual'),
139     ]
140
141 def setup(app):
142     app.add_object_type('role', 'role',
143     objname='Rolle',
144     indextemplate='pair: %s; Rolle')
145
146 rst_epilog = '.. |changesetid| replace:: %s' % changesetid