xref: /aosp_15_r20/external/coreboot/Documentation/conf.py (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1# Configuration file for the Sphinx documentation builder.
2#
3# For the full list of built-in configuration values, see the documentation:
4# https://www.sphinx-doc.org/en/master/usage/configuration.html
5
6# -- Project information -----------------------------------------------------
7# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
9import subprocess
10
11project = 'coreboot'
12copyright = 'CC-by 4.0 the coreboot project'
13author = 'the coreboot project'
14
15release = subprocess.check_output(('git', 'describe')).decode("utf-8")
16# The short X.Y version.
17version = release.split("-")[0]
18
19
20# -- General configuration ---------------------------------------------------
21# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
22
23extensions = ["myst_parser"]
24
25myst_heading_anchors = 5
26
27templates_path = ['_templates']
28exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
29
30# The name of the Pygments (syntax highlighting) style to use.
31pygments_style = 'sphinx'
32
33# Try to load DITAA
34try:
35    import sphinxcontrib.ditaa
36except ImportError:
37    print("Error: Please install sphinxcontrib.ditaa for ASCII art conversion\n")
38else:
39    extensions += ['sphinxcontrib.ditaa']
40
41# The language for content autogenerated by Sphinx. Refer to documentation
42# for a list of supported languages.
43#
44# This is also used if you do content translation via gettext catalogs.
45# Usually you set "language" from the command line for these cases.
46language = 'en'
47
48# -- Options for HTML output -------------------------------------------------
49# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
50
51html_theme = 'sphinx_rtd_theme'
52html_static_path = ['_static']
53html_css_files = [
54    'theme_overrides.css',  # override wide tables in RTD theme
55]
56