Nicholas Chin | 35599f9 | 2023-02-21 19:41:06 -0700 | [diff] [blame] | 1 | # Configuration file for the Sphinx documentation builder. |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 2 | # |
Nicholas Chin | 35599f9 | 2023-02-21 19:41:06 -0700 | [diff] [blame] | 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 | |
| 9 | import subprocess |
| 10 | |
| 11 | project = 'coreboot' |
| 12 | copyright = 'CC-by 4.0 the coreboot project' |
| 13 | author = 'the coreboot project' |
| 14 | |
Arthur Heymans | 5eb2115 | 2018-07-25 11:45:52 +0200 | [diff] [blame] | 15 | release = subprocess.check_output(('git', 'describe')).decode("utf-8") |
Patrick Georgi | 5ce4001 | 2018-06-06 17:03:21 +0200 | [diff] [blame] | 16 | # The short X.Y version. |
| 17 | version = release.split("-")[0] |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 18 | |
Nicholas Chin | 35599f9 | 2023-02-21 19:41:06 -0700 | [diff] [blame] | 19 | |
| 20 | # -- General configuration --------------------------------------------------- |
| 21 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 22 | |
| 23 | extensions = ["myst_parser"] |
| 24 | |
| 25 | myst_heading_anchors = 5 |
| 26 | |
| 27 | templates_path = ['_templates'] |
| 28 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 29 | |
| 30 | # The name of the Pygments (syntax highlighting) style to use. |
| 31 | pygments_style = 'sphinx' |
Patrick Rudolph | f664321 | 2020-05-17 20:04:12 +0200 | [diff] [blame] | 32 | |
| 33 | # Try to load DITAA |
| 34 | try: |
| 35 | import sphinxcontrib.ditaa |
| 36 | except ImportError: |
| 37 | print("Error: Please install sphinxcontrib.ditaa for ASCII art conversion\n") |
| 38 | else: |
Patrick Georgi | 20245aa | 2020-08-03 13:04:50 +0200 | [diff] [blame] | 39 | extensions += ['sphinxcontrib.ditaa'] |
Patrick Georgi | a73317e | 2019-12-10 20:27:38 +0100 | [diff] [blame] | 40 | |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 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. |
Nicholas Chin | b61ee16 | 2023-05-27 16:20:50 -0600 | [diff] [blame] | 46 | language = 'en' |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 47 | |
Nicholas Chin | 35599f9 | 2023-02-21 19:41:06 -0700 | [diff] [blame] | 48 | # -- Options for HTML output ------------------------------------------------- |
| 49 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 50 | |
Jonathan Neuschäfer | 5e48c75 | 2018-04-19 16:23:56 +0200 | [diff] [blame] | 51 | html_theme = 'sphinx_rtd_theme' |
Patrick Rudolph | a78e66e5 | 2018-05-13 16:06:51 +0200 | [diff] [blame] | 52 | html_static_path = ['_static'] |
Nicholas Chin | b61ee16 | 2023-05-27 16:20:50 -0600 | [diff] [blame] | 53 | html_css_files = [ |
| 54 | 'theme_overrides.css', # override wide tables in RTD theme |
| 55 | ] |