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