blob: 283be86749b88d7dda5f8e9a2325a2750810a76a [file] [log] [blame]
Imre Kisa21712e2019-10-08 12:56:59 +02001# -*- coding: utf-8 -*-
2#
3# Copyright (c) 2019-2021, Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7#
8# Configuration file for the Sphinx documentation builder.
9#
10# See the options documentation at http://www.sphinx-doc.org/en/master/config
11
12# -- Metadata about this file ------------------------------------------------
13__copyright__ = "Copyright (c) 2019-2021 Arm Limited"
14__license__ = "SPDX-License-Identifier: BSD-3-Clause"
15
16# Configuration file for the Sphinx documentation builder.
17
18# -- Path setup --------------------------------------------------------------
19
20# If extensions (or modules to document with autodoc) are in another directory,
21# add these directories to sys.path here. If the directory is relative to the
22# documentation root, use os.path.abspath to make it absolute, like shown here.
23#
24# import os
25# import sys
26# sys.path.insert(0, os.path.abspath('.'))
27
28# -- Project information -----------------------------------------------------
29project = 'Firmware Test Builder'
30copyright = 'Copyright (c) 2019-2021 Arm Limited'
31author = 'Arm Limited'
32
33# The full version, including alpha/beta/rc tags
34with open('../version.txt', 'r') as f:
35 release = f.read()
36 f.close()
37version = release
38
39
40# -- General configuration ---------------------------------------------------
41
42# Add any Sphinx extension module names here, as strings. They can be
43# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44# ones.
45extensions = ['sphinx.ext.autosectionlabel', 'sphinxcontrib.plantuml',
46 'sphinxcontrib.moderncmakedomain']
47
48# Add any paths that contain templates here, relative to this directory.
49templates_path = ['_templates']
50
51# The suffix(es) of source filenames.
52source_suffix = '.rst'
53
54# The master toctree document.
55master_doc = 'index'
56
57# The language for content autogenerated by Sphinx. Refer to documentation
58# for a list of supported languages.
59#
60# This is also used if you do content translation via gettext catalogs.
61# Usually you set "language" from the command line for these cases.
62language = None
63
64# List of patterns, relative to source directory, that match files and
65# directories to ignore when looking for source files.
66# This pattern also affects html_static_path and html_extra_path.
67exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
68
69# The name of the Pygments (syntax highlighting) style to use.
70pygments_style = 'sphinx'
71
72# Load the contents of the global substitutions file into the 'rst_prolog'
73# variable. This ensures that the substitutions are all inserted into each page.
74with open('global_substitutions.txt', 'r') as subs:
75 rst_prolog = subs.read()
76rst_prolog += "\n .. |RELEASE_NUMBER| replace:: %s" % (version)
77# Minimum version of sphinx required
78needs_sphinx = '2.0'
79
80# -- Options for HTML output -------------------------------------------------
81
82# Don't show the "Built with Sphinx" footer
83html_show_sphinx = False
84
85# Don't show copyright info in the footer (we have this content in the page)
86html_show_copyright = False
87
88# The theme to use for HTML and HTML Help pages. See the documentation for
89# a list of builtin themes.
90html_theme = "sphinx_rtd_theme"
91
92# The logo to display in the sidebar
93html_logo = 'resources/TrustedFirmware-Logo_standard-white.png'
94
95# Options for the "sphinx-rtd-theme" theme
96html_theme_options = {
97 'collapse_navigation': False, # Can expand and collapse sidebar entries
98 'prev_next_buttons_location': 'both', # Top and bottom of the page
99 'style_external_links': True # Display an icon next to external links
100}
101
102# -- Options for autosectionlabel --------------------------------------------
103
104# Only generate automatic section labels for document titles
105autosectionlabel_maxdepth = 1
106
107# -- Options for plantuml ----------------------------------------------------
108
109plantuml_output_format = 'svg_img'