mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-13 08:04:27 +00:00

One of the current issues with the documentation is that terms and abbreviations are frequently redefined. For example, we might have a sentence like "... the SCP (System Control Processor) will ...". These definitions might be repeated several times across pages, or even within the same document. Equally, some of these abbreviations are missed and are never expanded. Sphinx provides a :term: keyword that takes some text and, if that text is defined in a glossary document, links to its glossary entry. Using this functionality will prevent repeated definitions and will make the docs more maintainable by using a single definition source. The glossary added in this patch was created from a quick scrub of the source code - there may be missing entries. The SDEI abbreviation was used as an example. Note that a global_substitutions file was created. This file contains the RST 'replace' statements that convert plain text terms into linked terms (by adding the ':term:' keyword to them). An example is: .. |TF-A| replace:: :term:`TF-A` The 'rst_prolog' variable in conf.py is used to inject this list of replacements into each page. Terms must be surrounded with the pipe character to be turned into links - this means that we can still prevent certain terms from being linked if we don't want them to be. Change-Id: I87010ed9cfa4a60011a9b4a431b98cb4bb7baa28 Signed-off-by: Paul Beesley <paul.beesley@arm.com>
77 lines
2.5 KiB
Python
77 lines
2.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
# Copyright (c) 2019, Arm Limited. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
#
|
|
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# See the options documentation at http://www.sphinx-doc.org/en/master/config
|
|
|
|
import os
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
project = 'Trusted Firmware-A'
|
|
|
|
version = '2.1'
|
|
release = version # We don't need these to be distinct
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
# ones.
|
|
extensions = []
|
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
|
templates_path = ['_templates']
|
|
|
|
# The suffix(es) of source filenames.
|
|
source_suffix = '.rst'
|
|
|
|
# The master toctree document.
|
|
master_doc = 'index'
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
# for a list of supported languages.
|
|
#
|
|
# This is also used if you do content translation via gettext catalogs.
|
|
# Usually you set "language" from the command line for these cases.
|
|
language = None
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
# directories to ignore when looking for source files.
|
|
# This pattern also affects html_static_path and html_extra_path .
|
|
exclude_patterns = []
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
pygments_style = 'sphinx'
|
|
|
|
# Load the contents of the global substitutions file into the 'rst_prolog'
|
|
# variable. This ensures that the substitutions are all inserted into each page.
|
|
with open('global_substitutions.txt', 'r') as subs:
|
|
rst_prolog = subs.read()
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
# Don't show the "Built with Sphinx" footer
|
|
html_show_sphinx = False
|
|
|
|
# Don't show copyright info in the footer (we have this content in the page)
|
|
html_show_copyright = False
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
# a list of builtin themes.
|
|
html_theme = "sphinx_rtd_theme"
|
|
|
|
# The logo to display in the sidebar
|
|
html_logo = 'resources/TrustedFirmware-Logo_standard-white.png'
|
|
|
|
# Options for the "sphinx-rtd-theme" theme
|
|
html_theme_options = {
|
|
'collapse_navigation': False, # Can expand and collapse sidebar entries
|
|
'prev_next_buttons_location': 'both', # Top and bottom of the page
|
|
'style_external_links': True # Display an icon next to external links
|
|
}
|