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