|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# This file is execfile()d with the current directory set to its containing dir. |
| 4 | +# |
| 5 | +# Note that not all possible configuration values are present in this file. |
| 6 | +# |
| 7 | +# All configuration values have a default; values that are commented out |
| 8 | +# serve to show the default. |
| 9 | +# |
| 10 | +# Updated documentation of the configuration options is available at |
| 11 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 12 | + |
| 13 | +from datetime import datetime |
| 14 | + |
| 15 | +from antmicro_sphinx_utils.defaults import ( |
| 16 | + numfig_format, |
| 17 | + extensions as default_extensions, |
| 18 | + myst_enable_extensions as default_myst_enable_extensions, |
| 19 | + myst_fence_as_directive as default_myst_fence_as_directive, |
| 20 | + antmicro_html, |
| 21 | + antmicro_latex |
| 22 | +) |
| 23 | + |
| 24 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 25 | +# add these directories to sys.path here. If the directory is relative to the |
| 26 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 27 | +#sys.path.insert(0, os.path.abspath('.')) |
| 28 | + |
| 29 | +# -- General configuration ----------------------------------------------------- |
| 30 | + |
| 31 | +# General information about the project. |
| 32 | +project = u'CHIPS Alliance Caliptra Open Source I3C core' |
| 33 | +basic_filename = u'i3c-core-docs' |
| 34 | +authors = u'Antmicro' |
| 35 | +copyright = f'{authors}, {datetime.now().year}' |
| 36 | + |
| 37 | +# The short X.Y version. |
| 38 | +version = '' |
| 39 | +# The full version, including alpha/beta/rc tags. |
| 40 | +release = '' |
| 41 | + |
| 42 | +# This is temporary before the clash between myst-parser and immaterial is fixed |
| 43 | +sphinx_immaterial_override_builtin_admonitions = False |
| 44 | + |
| 45 | +numfig = True |
| 46 | + |
| 47 | +# If you need to add extensions just add to those lists |
| 48 | +extensions = default_extensions |
| 49 | +myst_enable_extensions = default_myst_enable_extensions |
| 50 | +myst_fence_as_directive = default_myst_fence_as_directive |
| 51 | + |
| 52 | +myst_substitutions = { |
| 53 | + "project": project |
| 54 | +} |
| 55 | + |
| 56 | +myst_heading_anchors = 4 |
| 57 | + |
| 58 | +today_fmt = '%Y-%m-%d' |
| 59 | + |
| 60 | +todo_include_todos=False |
| 61 | + |
| 62 | +# -- Options for HTML output --------------------------------------------------- |
| 63 | + |
| 64 | +html_theme = 'sphinx_immaterial' |
| 65 | + |
| 66 | +html_last_updated_fmt = today_fmt |
| 67 | + |
| 68 | +html_show_sphinx = False |
| 69 | + |
| 70 | +( |
| 71 | + html_logo, |
| 72 | + html_theme_options, |
| 73 | + html_context |
| 74 | +) = antmicro_html(pdf_url=f"{basic_filename}.pdf") |
| 75 | + |
| 76 | +html_title = project |
| 77 | + |
| 78 | +( |
| 79 | + latex_elements, |
| 80 | + latex_documents, |
| 81 | + latex_logo, |
| 82 | + latex_additional_files |
| 83 | +) = antmicro_latex(basic_filename, authors, project) |
0 commit comments