blob: 58e34269036fd1ad716c2596f34340e8a3af0292 [file] [log] [blame]
Soby Mathewb4c6df42022-11-09 11:13:29 +00001# -*- 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
9import os
10
11RMM_ROOT_DIR = "@CMAKE_SOURCE_DIR@"
12PLANTUML_JAR_PATH = "@PLANTUML_JAR_PATH@"
13Java_JAVA_EXECUTABLE = "@Java_JAVA_EXECUTABLE@"
14SPHINXCFG_RMM_VERSION = "v@CMAKE_PROJECT_VERSION@"
15
16# -- Project information -----------------------------------------------------
17
18project = 'Realm Management Monitor'
19copyright = 'TF-RMM Contributors'
20author = 'TF-RMM Contributors'
21title = 'User Guide'
22version = 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.
29extensions = ['sphinx.ext.autosectionlabel', 'sphinxcontrib.plantuml']
30
31#Location of PlantUML
32plantuml = Java_JAVA_EXECUTABLE + " -jar " + PLANTUML_JAR_PATH
33
34# Add any paths that contain templates here, relative to this directory.
35templates_path = ['_templates']
36
37# The suffix(es) of source filenames.
38source_suffix = ['.rst']
39
40# The master toctree document.
41master_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.
48language = 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 .
53exclude_patterns = []
54
55# The name of the Pygments (syntax highlighting) style to use.
56pygments_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.
60with open(RMM_ROOT_DIR + '/docs/global_substitutions.txt', 'r') as subs:
61 rst_prolog = subs.read()
62
63# Minimum version of sphinx required
64needs_sphinx = '2.4'
65
66# -- Options for HTML output -------------------------------------------------
67
68# Don't show the "Built with Sphinx" footer
69html_show_sphinx = False
70
71# Show copyright info in the footer
72html_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.
76html_theme = "sphinx_rtd_theme"
77
78# The logo to display in the sidebar
79html_logo = RMM_ROOT_DIR + '/docs/_static/images/TrustedFirmware-Logo_standard-white.png'
80
81# Options for the "sphinx-rtd-theme" theme
82html_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
89html_static_path = [RMM_ROOT_DIR + '/docs/_static']
90
91# Path to css file relative to html_static_path
92html_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
97autosectionlabel_maxdepth = 1
98
99# -- Options for plantuml ----------------------------------------------------
100
101plantuml_output_format = 'svg_img'