xref: /rk3399_ARM-atf/docs/conf.py (revision 29b11baf6b2e599a4305a11f2580ae4572bec564)
1653279b0SPaul Beesley# -*- coding: utf-8 -*-
2653279b0SPaul Beesley#
3*29b11bafSHarrison Mutai# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
4653279b0SPaul Beesley#
5653279b0SPaul Beesley# SPDX-License-Identifier: BSD-3-Clause
6653279b0SPaul Beesley#
7653279b0SPaul Beesley#
8653279b0SPaul Beesley# Configuration file for the Sphinx documentation builder.
9653279b0SPaul Beesley#
10653279b0SPaul Beesley# See the options documentation at http://www.sphinx-doc.org/en/master/config
11653279b0SPaul Beesley
128f62ca7bSPaul Beesleyimport os
138f62ca7bSPaul Beesley
14653279b0SPaul Beesley# -- Project information -----------------------------------------------------
15653279b0SPaul Beesley
16*29b11bafSHarrison Mutaiproject = "Trusted Firmware-A"
17653279b0SPaul Beesley
18653279b0SPaul Beesley# -- General configuration ---------------------------------------------------
19653279b0SPaul Beesley
20653279b0SPaul Beesley# Add any Sphinx extension module names here, as strings. They can be
21653279b0SPaul Beesley# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
22653279b0SPaul Beesley# ones.
23*29b11bafSHarrison Mutaiextensions = ["myst_parser", "sphinx.ext.autosectionlabel", "sphinxcontrib.plantuml"]
24653279b0SPaul Beesley
25653279b0SPaul Beesley# Add any paths that contain templates here, relative to this directory.
26*29b11bafSHarrison Mutaitemplates_path = ["_templates"]
27653279b0SPaul Beesley
28653279b0SPaul Beesley# The suffix(es) of source filenames.
29*29b11bafSHarrison Mutaisource_suffix = [".md", ".rst"]
30653279b0SPaul Beesley
31653279b0SPaul Beesley# The master toctree document.
32*29b11bafSHarrison Mutaimaster_doc = "index"
33653279b0SPaul Beesley
34653279b0SPaul Beesley# The language for content autogenerated by Sphinx. Refer to documentation
35653279b0SPaul Beesley# for a list of supported languages.
36653279b0SPaul Beesley#
37653279b0SPaul Beesley# This is also used if you do content translation via gettext catalogs.
38653279b0SPaul Beesley# Usually you set "language" from the command line for these cases.
39e48b1f8cSBoyan Karatotevlanguage = "en"
40653279b0SPaul Beesley
41653279b0SPaul Beesley# List of patterns, relative to source directory, that match files and
42653279b0SPaul Beesley# directories to ignore when looking for source files.
43653279b0SPaul Beesley# This pattern also affects html_static_path and html_extra_path .
443fd1fe38SBoyan Karatotev# Don't try to build the venv in case it's placed with the sources
453fd1fe38SBoyan Karatotevexclude_patterns = [".env", "env", ".venv", "venv"]
46653279b0SPaul Beesley
47653279b0SPaul Beesley# The name of the Pygments (syntax highlighting) style to use.
48*29b11bafSHarrison Mutaipygments_style = "sphinx"
49653279b0SPaul Beesley
508f62ca7bSPaul Beesley# Load the contents of the global substitutions file into the 'rst_prolog'
518f62ca7bSPaul Beesley# variable. This ensures that the substitutions are all inserted into each page.
52*29b11bafSHarrison Mutaiwith open("global_substitutions.txt", "r") as subs:
538f62ca7bSPaul Beesley    rst_prolog = subs.read()
54653279b0SPaul Beesley
55c4e4df35SPaul Beesley# Minimum version of sphinx required
56*29b11bafSHarrison Mutaineeds_sphinx = "2.0"
57c4e4df35SPaul Beesley
58653279b0SPaul Beesley# -- Options for HTML output -------------------------------------------------
59653279b0SPaul Beesley
60653279b0SPaul Beesley# Don't show the "Built with Sphinx" footer
61653279b0SPaul Beesleyhtml_show_sphinx = False
62653279b0SPaul Beesley
63653279b0SPaul Beesley# Don't show copyright info in the footer (we have this content in the page)
64653279b0SPaul Beesleyhtml_show_copyright = False
65653279b0SPaul Beesley
66653279b0SPaul Beesley# The theme to use for HTML and HTML Help pages.  See the documentation for
67653279b0SPaul Beesley# a list of builtin themes.
68653279b0SPaul Beesleyhtml_theme = "sphinx_rtd_theme"
69653279b0SPaul Beesley
70653279b0SPaul Beesley# The logo to display in the sidebar
71*29b11bafSHarrison Mutaihtml_logo = "resources/TrustedFirmware-Logo_standard-white.png"
72653279b0SPaul Beesley
73653279b0SPaul Beesley# Options for the "sphinx-rtd-theme" theme
74653279b0SPaul Beesleyhtml_theme_options = {
75*29b11bafSHarrison Mutai    "collapse_navigation": False,  # Can expand and collapse sidebar entries
76*29b11bafSHarrison Mutai    "prev_next_buttons_location": "both",  # Top and bottom of the page
77*29b11bafSHarrison Mutai    "style_external_links": True,  # Display an icon next to external links
78653279b0SPaul Beesley}
79c4e4df35SPaul Beesley
807006f208SZelalem# Path to _static directory
81*29b11bafSHarrison Mutaihtml_static_path = ["_static"]
827006f208SZelalem
837006f208SZelalem# Path to css file relative to html_static_path
847006f208SZelalemhtml_css_files = [
85*29b11bafSHarrison Mutai    "css/custom.css",
867006f208SZelalem]
877006f208SZelalem
88c4e4df35SPaul Beesley# -- Options for autosectionlabel --------------------------------------------
89c4e4df35SPaul Beesley
90c4e4df35SPaul Beesley# Only generate automatic section labels for document titles
91c4e4df35SPaul Beesleyautosectionlabel_maxdepth = 1
927cb68807SPaul Beesley
937cb68807SPaul Beesley# -- Options for plantuml ----------------------------------------------------
947cb68807SPaul Beesley
95*29b11bafSHarrison Mutaiplantuml_output_format = "svg_img"
96