blob: ff1ad9d8e25ac5df0dc3e4f69e8be04391ddee0c [file] [log] [blame]
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +02001# -*- coding: utf-8 -*-
Patrick Georgi5ce40012018-06-06 17:03:21 +02002import subprocess
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +02003
4# Add any paths that contain templates here, relative to this directory.
5templates_path = ['_templates']
6
7# The suffix(es) of source filenames.
8source_suffix = ['.md']
9
10# The master toctree document.
11master_doc = 'index'
12
13# General information about the project.
14project = u'coreboot'
Patrick Rudolph93ffe832018-05-13 16:18:36 +020015copyright = u'CC-by 4.0 the coreboot project'
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020016author = u'the coreboot project'
17
18# The version info for the project you're documenting, acts as replacement for
19# |version| and |release|, also used in various other places throughout the
20# built documents.
21#
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020022# The full version, including alpha/beta/rc tags.
Arthur Heymans5eb21152018-07-25 11:45:52 +020023release = subprocess.check_output(('git', 'describe')).decode("utf-8")
Patrick Georgi5ce40012018-06-06 17:03:21 +020024# The short X.Y version.
25version = release.split("-")[0]
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020026
27# The language for content autogenerated by Sphinx. Refer to documentation
28# for a list of supported languages.
29#
30# This is also used if you do content translation via gettext catalogs.
31# Usually you set "language" from the command line for these cases.
32language = None
33
34# List of patterns, relative to source directory, that match files and
35# directories to ignore when looking for source files.
36# This patterns also effect to html_static_path and html_extra_path
37exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
38
39# The name of the Pygments (syntax highlighting) style to use.
40pygments_style = 'sphinx'
41
42# A list of ignored prefixes for module index sorting.
43# modindex_common_prefix = []
44
45# If true, keep warnings as "system message" paragraphs in the built documents.
46# keep_warnings = False
47
48# If true, `todo` and `todoList` produce output, else they produce nothing.
49todo_include_todos = False
50
51
52# -- Options for HTML output ----------------------------------------------
53
54# The theme to use for HTML and HTML Help pages. See the documentation for
55# a list of builtin themes.
56#
57html_theme = 'sphinx_rtd_theme'
58
59# Add any paths that contain custom static files (such as style sheets) here,
60# relative to this directory. They are copied after the builtin static files,
61# so a file named "default.css" will overwrite the builtin "default.css".
Patrick Rudolpha78e66e52018-05-13 16:06:51 +020062html_static_path = ['_static']
63
64html_context = {
65 'css_files': [
66 '_static/theme_overrides.css', # override wide tables in RTD theme
67 ],
68}
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020069
70# Output file base name for HTML help builder.
71htmlhelp_basename = 'corebootdoc'
72
73# -- Options for LaTeX output ---------------------------------------------
74
75latex_elements = {
76 # The paper size ('letterpaper' or 'a4paper').
77 #
78 # 'papersize': 'letterpaper',
79
80 # The font size ('10pt', '11pt' or '12pt').
81 #
82 # 'pointsize': '10pt',
83
84 # Additional stuff for the LaTeX preamble.
85 #
86 # 'preamble': '',
87
88 # Latex figure (float) alignment
89 #
90 # 'figure_align': 'htbp',
91}
92
93# Grouping the document tree into LaTeX files. List of tuples
94# (source start file, target name, title,
95# author, documentclass [howto, manual, or own class]).
96latex_documents = [
97 (master_doc, 'coreboot.tex', u'coreboot Documentation',
98 u'the coreboot project', 'manual'),
99]
100
101# The name of an image file (relative to this directory) to place at the top of
102# the title page.
103#
104# latex_logo = None
105
106# For "manual" documents, if this is true, then toplevel headings are parts,
107# not chapters.
108#
109# latex_use_parts = False
110
111# If true, show page references after internal links.
112#
113# latex_show_pagerefs = False
114
115# If true, show URL addresses after external links.
116#
117# latex_show_urls = False
118
119# Documents to append as an appendix to all manuals.
120#
121# latex_appendices = []
122
Elyes HAOUAS89011be2018-05-29 08:31:10 +0200123# If false, will not define \strong, \code, itleref, \crossref ... but only
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +0200124# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
125# packages.
126#
127# latex_keep_old_macro_names = True
128
129# If false, no module index is generated.
130#
131# latex_domain_indices = True
132
133
134# -- Options for manual page output ---------------------------------------
135
136# One entry per manual page. List of tuples
137# (source start file, name, description, authors, manual section).
138man_pages = [
139 (master_doc, 'coreboot', u'coreboot Documentation',
140 [author], 1)
141]
142
143# If true, show URL addresses after external links.
144#
145# man_show_urls = False
146
147
148# -- Options for Texinfo output -------------------------------------------
149
150# Grouping the document tree into Texinfo files. List of tuples
151# (source start file, target name, title, author,
152# dir menu entry, description, category)
153texinfo_documents = [
154 (master_doc, 'coreboot', u'coreboot Documentation',
155 author, 'coreboot', 'One line description of project.',
156 'Miscellaneous'),
157]
158
159source_parsers = {
160 '.md': 'recommonmark.parser.CommonMarkParser',
161}
162
163# Documents to append as an appendix to all manuals.
164#
165# texinfo_appendices = []
166
167# If false, no module index is generated.
168#
169# texinfo_domain_indices = True
170
171# How to display URL addresses: 'footnote', 'no', or 'inline'.
172#
173# texinfo_show_urls = 'footnote'
174
175# If true, do not generate a @detailmenu in the "Top" node's menu.
176#
177# texinfo_no_detailmenu = False
178
179enable_auto_toc_tree = True
180
181
182def setup(app):
183 from recommonmark.transform import AutoStructify
184 app.add_config_value('recommonmark_config', {
185 'enable_auto_toc_tree': True,
186 'enable_auto_doc_ref': True,
Philipp Deppenwiese57df0882018-05-09 12:07:38 +0200187 'enable_eval_rst': True,
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +0200188 'url_resolver': lambda url: '/' + url
189 }, True)
190 app.add_transform(AutoStructify)