Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame^] | 1 | # -*- coding: utf-8 -*- |
| 2 | # SPDX-License-Identifier: BSD-3-Clause |
| 3 | # SPDX-FileCopyrightText: Copyright TF-RMM Contributors. |
| 4 | # |
| 5 | # Configuration file for the Sphinx documentation builder. |
| 6 | # |
| 7 | # See the options documentation at http://www.sphinx-doc.org/en/master/config |
| 8 | |
| 9 | import os |
| 10 | |
| 11 | RMM_ROOT_DIR = "@CMAKE_SOURCE_DIR@" |
| 12 | PLANTUML_JAR_PATH = "@PLANTUML_JAR_PATH@" |
| 13 | Java_JAVA_EXECUTABLE = "@Java_JAVA_EXECUTABLE@" |
| 14 | SPHINXCFG_RMM_VERSION = "v@CMAKE_PROJECT_VERSION@" |
| 15 | |
| 16 | # -- Project information ----------------------------------------------------- |
| 17 | |
| 18 | project = 'Realm Management Monitor' |
| 19 | copyright = 'TF-RMM Contributors' |
| 20 | author = 'TF-RMM Contributors' |
| 21 | title = 'User Guide' |
| 22 | version = SPHINXCFG_RMM_VERSION |
| 23 | |
| 24 | # -- General configuration --------------------------------------------------- |
| 25 | |
| 26 | # Add any Sphinx extension module names here, as strings. They can be |
| 27 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 28 | # ones. |
| 29 | extensions = ['sphinx.ext.autosectionlabel', 'sphinxcontrib.plantuml'] |
| 30 | |
| 31 | #Location of PlantUML |
| 32 | plantuml = Java_JAVA_EXECUTABLE + " -jar " + PLANTUML_JAR_PATH |
| 33 | |
| 34 | # Add any paths that contain templates here, relative to this directory. |
| 35 | templates_path = ['_templates'] |
| 36 | |
| 37 | # The suffix(es) of source filenames. |
| 38 | source_suffix = ['.rst'] |
| 39 | |
| 40 | # The master toctree document. |
| 41 | master_doc = 'index' |
| 42 | |
| 43 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 44 | # for a list of supported languages. |
| 45 | # |
| 46 | # This is also used if you do content translation via gettext catalogs. |
| 47 | # Usually you set "language" from the command line for these cases. |
| 48 | language = None |
| 49 | |
| 50 | # List of patterns, relative to source directory, that match files and |
| 51 | # directories to ignore when looking for source files. |
| 52 | # This pattern also affects html_static_path and html_extra_path . |
| 53 | exclude_patterns = [] |
| 54 | |
| 55 | # The name of the Pygments (syntax highlighting) style to use. |
| 56 | pygments_style = 'sphinx' |
| 57 | |
| 58 | # Load the contents of the global substitutions file into the 'rst_prolog' |
| 59 | # variable. This ensures that the substitutions are all inserted into each page. |
| 60 | with open(RMM_ROOT_DIR + '/docs/global_substitutions.txt', 'r') as subs: |
| 61 | rst_prolog = subs.read() |
| 62 | |
| 63 | # Minimum version of sphinx required |
| 64 | needs_sphinx = '2.4' |
| 65 | |
| 66 | # -- Options for HTML output ------------------------------------------------- |
| 67 | |
| 68 | # Don't show the "Built with Sphinx" footer |
| 69 | html_show_sphinx = False |
| 70 | |
| 71 | # Show copyright info in the footer |
| 72 | html_show_copyright = True |
| 73 | |
| 74 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 75 | # a list of builtin themes. |
| 76 | html_theme = "sphinx_rtd_theme" |
| 77 | |
| 78 | # The logo to display in the sidebar |
| 79 | html_logo = RMM_ROOT_DIR + '/docs/_static/images/TrustedFirmware-Logo_standard-white.png' |
| 80 | |
| 81 | # Options for the "sphinx-rtd-theme" theme |
| 82 | html_theme_options = { |
| 83 | 'collapse_navigation': False, # Can expand and collapse sidebar entries |
| 84 | 'prev_next_buttons_location': 'both', # Top and bottom of the page |
| 85 | 'style_external_links': True # Display an icon next to external links |
| 86 | } |
| 87 | |
| 88 | # Path to _static directory |
| 89 | html_static_path = [RMM_ROOT_DIR + '/docs/_static'] |
| 90 | |
| 91 | # Path to css file relative to html_static_path |
| 92 | html_css_files = [RMM_ROOT_DIR + '/docs/_static/css/rmm_custom.css',] |
| 93 | |
| 94 | # -- Options for autosectionlabel -------------------------------------------- |
| 95 | |
| 96 | # Only generate automatic section labels for document titles |
| 97 | autosectionlabel_maxdepth = 1 |
| 98 | |
| 99 | # -- Options for plantuml ---------------------------------------------------- |
| 100 | |
| 101 | plantuml_output_format = 'svg_img' |