Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 3 | # Zephyr documentation build configuration file, created by |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 4 | # sphinx-quickstart on Fri May 8 11:43:01 2015. |
| 5 | # |
| 6 | # This file is execfile()d with the current directory set to its |
| 7 | # containing dir. |
| 8 | # |
| 9 | # Note that not all possible configuration values are present in this |
| 10 | # autogenerated file. |
| 11 | # |
| 12 | # All configuration values have a default; values that are commented out |
| 13 | # serve to show the default. |
| 14 | |
| 15 | import sys |
| 16 | import os |
Carles Cufi | 8d5259a | 2018-11-12 16:14:51 +0100 | [diff] [blame] | 17 | from subprocess import CalledProcessError, check_output, DEVNULL |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 18 | |
Marti Bolivar | 1c852dd | 2018-06-07 21:45:55 -0400 | [diff] [blame] | 19 | if "ZEPHYR_BASE" not in os.environ: |
Marti Bolivar | f825169 | 2018-06-08 09:54:22 -0400 | [diff] [blame] | 20 | sys.exit("$ZEPHYR_BASE environment variable undefined.") |
Carles Cufi | e182dbc | 2018-07-16 19:05:05 +0200 | [diff] [blame] | 21 | ZEPHYR_BASE = os.path.abspath(os.environ["ZEPHYR_BASE"]) |
| 22 | |
| 23 | if "ZEPHYR_BUILD" not in os.environ: |
| 24 | sys.exit("$ZEPHYR_BUILD environment variable undefined.") |
| 25 | ZEPHYR_BUILD = os.path.abspath(os.environ["ZEPHYR_BUILD"]) |
Marti Bolivar | 1c852dd | 2018-06-07 21:45:55 -0400 | [diff] [blame] | 26 | |
Marti Bolivar | 6092fb0 | 2017-11-03 16:46:33 -0400 | [diff] [blame] | 27 | # Add the 'extensions' directory to sys.path, to enable finding Sphinx |
| 28 | # extensions within. |
Carles Cufi | e182dbc | 2018-07-16 19:05:05 +0200 | [diff] [blame] | 29 | sys.path.insert(0, os.path.join(ZEPHYR_BASE, 'doc', 'extensions')) |
Carles Cufi | 8d5259a | 2018-11-12 16:14:51 +0100 | [diff] [blame] | 30 | |
Marti Bolivar | ab82264 | 2019-01-23 08:31:06 -0700 | [diff] [blame] | 31 | # Add the directory which contains the runners package as well, |
| 32 | # for autodoc directives on runners.xyz. |
| 33 | sys.path.insert(0, os.path.join(ZEPHYR_BASE, 'scripts', 'west_commands')) |
| 34 | |
Carles Cufi | 8d5259a | 2018-11-12 16:14:51 +0100 | [diff] [blame] | 35 | west_found = False |
| 36 | |
| 37 | try: |
| 38 | desc = check_output(['west', 'list', '-f{abspath}', 'west'], |
| 39 | stderr=DEVNULL, |
| 40 | cwd=os.path.dirname(__file__)) |
| 41 | west_path = desc.decode(sys.getdefaultencoding()).strip() |
| 42 | # Add west, to be able to pull in its API docs. |
| 43 | sys.path.append(os.path.join(west_path, 'src')) |
| 44 | west_found = True |
| 45 | except FileNotFoundError as e: |
| 46 | # west not installed |
| 47 | pass |
| 48 | except CalledProcessError as e: |
| 49 | # west not able to list itself |
| 50 | pass |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 51 | |
| 52 | # -- General configuration ------------------------------------------------ |
| 53 | |
| 54 | # If your documentation needs a minimal Sphinx version, state it here. |
| 55 | #needs_sphinx = '1.0' |
| 56 | |
| 57 | # Add any Sphinx extension module names here, as strings. They can be |
| 58 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 59 | # ones. |
| 60 | extensions = [ |
David B. Kinder | 05e00f6 | 2018-02-22 10:09:52 -0800 | [diff] [blame] | 61 | 'breathe', 'sphinx.ext.todo', |
Marti Bolivar | 6092fb0 | 2017-11-03 16:46:33 -0400 | [diff] [blame] | 62 | 'sphinx.ext.extlinks', |
Marti Bolivar | 3a766ae | 2018-06-07 22:07:00 -0400 | [diff] [blame] | 63 | 'sphinx.ext.autodoc', |
Marti Bolivar | 6092fb0 | 2017-11-03 16:46:33 -0400 | [diff] [blame] | 64 | 'zephyr.application', |
Anas Nashif | 38a7779 | 2019-01-20 08:56:48 -0500 | [diff] [blame] | 65 | 'zephyr.html_redirects', |
Anas Nashif | 072c466 | 2019-01-20 10:48:54 -0500 | [diff] [blame] | 66 | 'only.eager_only', |
| 67 | 'zephyr.link-roles' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 68 | ] |
| 69 | |
Daniel Leung | 9945e7f | 2018-08-23 11:11:11 -0700 | [diff] [blame] | 70 | # Only use SVG converter when it is really needed, e.g. LaTeX. |
| 71 | if tags.has("svgconvert"): |
| 72 | extensions.append('sphinxcontrib.rsvgconverter') |
| 73 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 74 | # Add any paths that contain templates here, relative to this directory. |
| 75 | templates_path = ['_templates'] |
| 76 | |
| 77 | # The suffix(es) of source filenames. |
| 78 | # You can specify multiple suffix as a list of string: |
| 79 | # source_suffix = ['.rst', '.md'] |
| 80 | source_suffix = '.rst' |
| 81 | |
| 82 | # The encoding of source files. |
| 83 | #source_encoding = 'utf-8-sig' |
| 84 | |
| 85 | # The master toctree document. |
| 86 | master_doc = 'index' |
| 87 | |
| 88 | # General information about the project. |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 89 | project = u'Zephyr Project' |
David B. Kinder | 2e1021d | 2018-12-27 16:57:55 -0800 | [diff] [blame] | 90 | copyright = u'2015-2019 Zephyr Project members and individual contributors' |
Anas Nashif | 5d91118 | 2019-01-06 17:21:04 -0500 | [diff] [blame] | 91 | author = u'The Zephyr Project' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 92 | |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 93 | # The following code tries to extract the information by reading the Makefile, |
| 94 | # when Sphinx is run directly (e.g. by Read the Docs). |
| 95 | try: |
Anas Nashif | cb9390c | 2017-11-19 23:03:58 -0500 | [diff] [blame] | 96 | version_major = None |
| 97 | version_minor = None |
| 98 | patchlevel = None |
| 99 | extraversion = None |
Anas Nashif | 7514178 | 2017-12-09 11:20:44 -0500 | [diff] [blame] | 100 | for line in open(os.path.join(ZEPHYR_BASE, 'VERSION')): |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 101 | key, val = [x.strip() for x in line.split('=', 2)] |
| 102 | if key == 'VERSION_MAJOR': |
Anas Nashif | cb9390c | 2017-11-19 23:03:58 -0500 | [diff] [blame] | 103 | version_major = val |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 104 | if key == 'VERSION_MINOR': |
Anas Nashif | cb9390c | 2017-11-19 23:03:58 -0500 | [diff] [blame] | 105 | version_minor = val |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 106 | elif key == 'PATCHLEVEL': |
Anas Nashif | cb9390c | 2017-11-19 23:03:58 -0500 | [diff] [blame] | 107 | patchlevel = val |
| 108 | elif key == 'EXTRAVERSION': |
| 109 | extraversion = val |
| 110 | if version_major and version_minor and patchlevel and extraversion: |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 111 | break |
| 112 | except: |
| 113 | pass |
| 114 | finally: |
Anas Nashif | 7514178 | 2017-12-09 11:20:44 -0500 | [diff] [blame] | 115 | if version_major and version_minor and patchlevel and extraversion is not None : |
Anas Nashif | cb9390c | 2017-11-19 23:03:58 -0500 | [diff] [blame] | 116 | version = release = version_major + '.' + version_minor + '.' + patchlevel |
| 117 | if extraversion != '': |
| 118 | version = release = version + '-' + extraversion |
Anas Nashif | 762bd85 | 2016-12-23 12:25:06 -0500 | [diff] [blame] | 119 | else: |
| 120 | sys.stderr.write('Warning: Could not extract kernel version\n') |
| 121 | version = release = "unknown version" |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 122 | |
| 123 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 124 | # for a list of supported languages. |
| 125 | # |
| 126 | # This is also used if you do content translation via gettext catalogs. |
| 127 | # Usually you set "language" from the command line for these cases. |
| 128 | language = None |
| 129 | |
| 130 | # There are two options for replacing |today|: either, you set today to some |
| 131 | # non-false value, then it is used: |
| 132 | #today = '' |
| 133 | # Else, today_fmt is used as the format for a strftime call. |
| 134 | #today_fmt = '%B %d, %Y' |
| 135 | |
| 136 | # List of patterns, relative to source directory, that match files and |
| 137 | # directories to ignore when looking for source files. |
| 138 | exclude_patterns = ['_build'] |
Carles Cufi | 8d5259a | 2018-11-12 16:14:51 +0100 | [diff] [blame] | 139 | if not west_found: |
| 140 | exclude_patterns.append('**/*west-apis*') |
| 141 | else: |
| 142 | exclude_patterns.append('**/*west-not-found*') |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 143 | |
| 144 | # The reST default role (used for this markup: `text`) to use for all |
| 145 | # documents. |
| 146 | #default_role = None |
| 147 | |
| 148 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 149 | #add_function_parentheses = True |
| 150 | |
| 151 | # If true, the current module name will be prepended to all description |
| 152 | # unit titles (such as .. function::). |
| 153 | #add_module_names = True |
| 154 | |
| 155 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 156 | # output. They are ignored by default. |
| 157 | #show_authors = False |
| 158 | |
| 159 | # The name of the Pygments (syntax highlighting) style to use. |
| 160 | pygments_style = 'sphinx' |
| 161 | |
Bobby Noelte | a5a29e4 | 2018-02-08 10:48:01 +0100 | [diff] [blame] | 162 | # Additional lexer for Pygments (syntax highlighting) |
| 163 | from lexer.DtsLexer import DtsLexer |
| 164 | from sphinx.highlighting import lexers |
| 165 | lexers['DTS'] = DtsLexer() |
| 166 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 167 | # A list of ignored prefixes for module index sorting. |
| 168 | #modindex_common_prefix = [] |
| 169 | |
| 170 | # If true, keep warnings as "system message" paragraphs in the built documents. |
| 171 | #keep_warnings = False |
| 172 | |
| 173 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
Carol Lee | 1aa7733 | 2015-08-07 13:22:27 -0400 | [diff] [blame] | 174 | todo_include_todos = False |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 175 | |
| 176 | rst_epilog = """ |
David B. Kinder | 486c5a5 | 2018-05-04 16:31:05 -0700 | [diff] [blame] | 177 | .. include:: /substitutions.txt |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 178 | """ |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 179 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 180 | # -- Options for HTML output ---------------------------------------------- |
| 181 | |
David B. Kinder | 5c8398d | 2018-08-03 16:12:03 -0700 | [diff] [blame] | 182 | import sphinx_rtd_theme |
| 183 | html_theme = "sphinx_rtd_theme" |
| 184 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
Anas Nashif | 457ae38 | 2017-01-04 09:39:45 -0500 | [diff] [blame] | 185 | |
Anas Nashif | 3ba693f | 2017-05-19 08:36:20 -0400 | [diff] [blame] | 186 | if tags.has('release'): |
Anas Nashif | b53d697 | 2017-11-17 19:02:11 -0500 | [diff] [blame] | 187 | is_release = True |
Anas Nashif | 3ba693f | 2017-05-19 08:36:20 -0400 | [diff] [blame] | 188 | docs_title = 'Docs / %s' %(version) |
| 189 | else: |
Anas Nashif | b53d697 | 2017-11-17 19:02:11 -0500 | [diff] [blame] | 190 | is_release = False |
David B. Kinder | 5229f87 | 2018-03-02 14:01:52 -0800 | [diff] [blame] | 191 | docs_title = 'Docs / Latest' |
Anas Nashif | 3ba693f | 2017-05-19 08:36:20 -0400 | [diff] [blame] | 192 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 193 | # The name for this set of Sphinx documents. If None, it defaults to |
| 194 | # "<project> v<release> documentation". |
Anas Nashif | 1286750 | 2015-06-29 15:33:28 -0400 | [diff] [blame] | 195 | html_title = "Zephyr Project Documentation" |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 196 | |
Yannis Damigos | ab1c6a1 | 2016-03-02 10:38:49 +0200 | [diff] [blame] | 197 | # This value determines the text for the permalink; it defaults to "¶". |
| 198 | # Set it to None or the empty string to disable permalinks. |
David B. Kinder | 4031da8 | 2017-02-06 09:51:15 -0800 | [diff] [blame] | 199 | #html_add_permalinks = "" |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 200 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 201 | # A shorter title for the navigation bar. Default is the same as html_title. |
| 202 | #html_short_title = None |
| 203 | |
| 204 | # The name of an image file (relative to this directory) to place at the top |
| 205 | # of the sidebar. |
David B. Kinder | f3f266e | 2018-07-31 13:47:10 -0700 | [diff] [blame] | 206 | html_logo = 'images/Zephyr-Kite-logo.png' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 207 | |
| 208 | # The name of an image file (within the static path) to use as favicon of the |
| 209 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 210 | # pixels large. |
David B. Kinder | d47bd0b | 2018-07-26 13:30:42 -0700 | [diff] [blame] | 211 | html_favicon = 'images/zp_favicon.png' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 212 | |
| 213 | # Add any paths that contain custom static files (such as style sheets) here, |
| 214 | # relative to this directory. They are copied after the builtin static files, |
| 215 | # so a file named "default.css" will overwrite the builtin "default.css". |
Carles Cufi | e182dbc | 2018-07-16 19:05:05 +0200 | [diff] [blame] | 216 | html_static_path = ['{}/doc/static'.format(ZEPHYR_BASE)] |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 217 | |
| 218 | # Add any extra paths that contain custom files (such as robots.txt or |
| 219 | # .htaccess) here, relative to this directory. These files are copied |
| 220 | # directly to the root of the documentation. |
| 221 | #html_extra_path = [] |
| 222 | |
| 223 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 224 | # using the given strftime format. |
Anas Nashif | 5d91c93 | 2015-05-28 07:43:26 -0400 | [diff] [blame] | 225 | html_last_updated_fmt = '%b %d, %Y' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 226 | |
| 227 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 228 | # typographically correct entities. |
Carol Lee | 1aa7733 | 2015-08-07 13:22:27 -0400 | [diff] [blame] | 229 | #html_use_smartypants = |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 230 | |
| 231 | # Custom sidebar templates, maps document names to template names. |
| 232 | #html_sidebars = {} |
| 233 | |
| 234 | # Additional templates that should be rendered to pages, maps page names to |
| 235 | # template names. |
| 236 | #html_additional_pages = {} |
| 237 | |
| 238 | # If false, no module index is generated. |
Carol Lee | 1aa7733 | 2015-08-07 13:22:27 -0400 | [diff] [blame] | 239 | html_domain_indices = False |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 240 | |
| 241 | # If false, no index is generated. |
Carol Lee | 1aa7733 | 2015-08-07 13:22:27 -0400 | [diff] [blame] | 242 | html_use_index = True |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 243 | |
| 244 | # If true, the index is split into individual pages for each letter. |
Carol Lee | 1aa7733 | 2015-08-07 13:22:27 -0400 | [diff] [blame] | 245 | html_split_index = True |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 246 | |
| 247 | # If true, links to the reST sources are added to the pages. |
David B. Kinder | f3f266e | 2018-07-31 13:47:10 -0700 | [diff] [blame] | 248 | html_show_sourcelink = False |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 249 | |
| 250 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 251 | html_show_sphinx = False |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 252 | |
| 253 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
David B. Kinder | 531f8ed | 2018-09-10 12:32:52 -0700 | [diff] [blame] | 254 | # html_show_copyright = tags.has('development') |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 255 | |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 256 | # If true, license is shown in the HTML footer. Default is True. |
| 257 | html_show_license = True |
| 258 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 259 | # If true, an OpenSearch description file will be output, and all pages will |
| 260 | # contain a <link> tag referring to it. The value of this option must be the |
| 261 | # base URL from which the finished HTML is served. |
| 262 | #html_use_opensearch = '' |
| 263 | |
| 264 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
| 265 | #html_file_suffix = None |
| 266 | |
| 267 | # Language to be used for generating the HTML full-text search index. |
| 268 | # Sphinx supports the following languages: |
| 269 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' |
| 270 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' |
| 271 | #html_search_language = 'en' |
| 272 | |
David B. Kinder | 8875a98 | 2017-08-22 12:29:10 -0700 | [diff] [blame] | 273 | sourcelink_suffix = '.txt' |
| 274 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 275 | # A dictionary with options for the search language support, empty by default. |
| 276 | # Now only 'ja' uses this config value |
| 277 | #html_search_options = {'type': 'default'} |
| 278 | |
| 279 | # The name of a javascript file (relative to the configuration directory) that |
| 280 | # implements a search results scorer. If empty, the default will be used. |
| 281 | #html_search_scorer = 'scorer.js' |
| 282 | |
| 283 | # Output file base name for HTML help builder. |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 284 | htmlhelp_basename = 'zephyrdoc' |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 285 | |
Anas Nashif | 38a7779 | 2019-01-20 08:56:48 -0500 | [diff] [blame] | 286 | |
| 287 | # Custom added feature to allow redirecting old URLs |
| 288 | # |
| 289 | # list of tuples (old_url, new_url) for pages to redirect |
| 290 | # (URLs should be relative to document root, only) |
Anas Nashif | 2b9458c | 2019-02-03 17:29:46 -0500 | [diff] [blame] | 291 | html_redirect_pages = [ |
| 292 | ('contribute/contribute_guidelines', 'contribute/index'), |
| 293 | ('application/application', 'application/index.rst'), |
| 294 | ('security/security', 'security/index'), |
| 295 | ('boards/boards', 'boards/index'), |
| 296 | ('samples/samples', 'samples/index'), |
| 297 | ('releases/release-notes', 'releases/index'), |
| 298 | ('getting_started/getting_starting', 'getting_started/index'), |
| 299 | ('introduction/introducing_zephyr', 'introduction/index'), |
| 300 | ('api/index', 'reference/index'), |
| 301 | ('api/api', 'reference/index'), |
| 302 | ('subsystems/subsystems', 'reference/index'), |
| 303 | ('kernel/kernel', 'reference/kernel/index'), |
| 304 | |
| 305 | ] |
Anas Nashif | 38a7779 | 2019-01-20 08:56:48 -0500 | [diff] [blame] | 306 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 307 | # -- Options for LaTeX output --------------------------------------------- |
| 308 | |
| 309 | latex_elements = { |
| 310 | # The paper size ('letterpaper' or 'a4paper'). |
| 311 | #'papersize': 'letterpaper', |
| 312 | |
| 313 | # The font size ('10pt', '11pt' or '12pt'). |
| 314 | #'pointsize': '10pt', |
| 315 | |
| 316 | # Additional stuff for the LaTeX preamble. |
Daniel Leung | 9945e7f | 2018-08-23 11:11:11 -0700 | [diff] [blame] | 317 | 'preamble': '\setcounter{tocdepth}{2}', |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 318 | |
| 319 | # Latex figure (float) alignment |
| 320 | #'figure_align': 'htbp', |
| 321 | } |
| 322 | |
| 323 | # Grouping the document tree into LaTeX files. List of tuples |
| 324 | # (source start file, target name, title, |
| 325 | # author, documentclass [howto, manual, or own class]). |
| 326 | latex_documents = [ |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 327 | (master_doc, 'zephyr.tex', u'Zephyr Project Documentation', |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 328 | u'many', 'manual'), |
| 329 | ] |
| 330 | |
| 331 | # The name of an image file (relative to this directory) to place at the top of |
| 332 | # the title page. |
| 333 | #latex_logo = None |
| 334 | |
| 335 | # For "manual" documents, if this is true, then toplevel headings are parts, |
| 336 | # not chapters. |
| 337 | #latex_use_parts = False |
| 338 | |
| 339 | # If true, show page references after internal links. |
| 340 | #latex_show_pagerefs = False |
| 341 | |
| 342 | # If true, show URL addresses after external links. |
| 343 | #latex_show_urls = False |
| 344 | |
| 345 | # Documents to append as an appendix to all manuals. |
| 346 | #latex_appendices = [] |
| 347 | |
| 348 | # If false, no module index is generated. |
| 349 | #latex_domain_indices = True |
| 350 | |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 351 | # -- Options for manual page output --------------------------------------- |
| 352 | |
| 353 | # One entry per manual page. List of tuples |
| 354 | # (source start file, name, description, authors, manual section). |
| 355 | man_pages = [ |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 356 | (master_doc, 'zephyr', u'Zephyr Project Documentation', |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 357 | [author], 1) |
| 358 | ] |
| 359 | |
| 360 | # If true, show URL addresses after external links. |
| 361 | #man_show_urls = False |
| 362 | |
| 363 | |
| 364 | # -- Options for Texinfo output ------------------------------------------- |
| 365 | |
| 366 | # Grouping the document tree into Texinfo files. List of tuples |
| 367 | # (source start file, target name, title, author, |
| 368 | # dir menu entry, description, category) |
| 369 | texinfo_documents = [ |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 370 | (master_doc, 'zephyr', u'Zephyr Project Documentation', |
| 371 | author, 'Zephyr', 'One line description of project.', |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 372 | 'Miscellaneous'), |
| 373 | ] |
| 374 | |
| 375 | # Documents to append as an appendix to all manuals. |
| 376 | #texinfo_appendices = [] |
| 377 | |
| 378 | # If false, no module index is generated. |
| 379 | #texinfo_domain_indices = True |
| 380 | |
| 381 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
| 382 | #texinfo_show_urls = 'footnote' |
| 383 | |
| 384 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
| 385 | #texinfo_no_detailmenu = False |
| 386 | |
Rodrigo Caballero | c394b34 | 2015-05-15 11:35:25 -0500 | [diff] [blame] | 387 | breathe_projects = { |
Carles Cufi | e182dbc | 2018-07-16 19:05:05 +0200 | [diff] [blame] | 388 | "Zephyr": "{}/doxygen/xml".format(ZEPHYR_BUILD), |
| 389 | "doc-examples": "{}/doxygen/xml".format(ZEPHYR_BUILD) |
Anas Nashif | 06d380c | 2015-05-13 14:05:30 -0400 | [diff] [blame] | 390 | } |
Anas Nashif | 089a10b | 2015-06-12 10:51:09 -0700 | [diff] [blame] | 391 | breathe_default_project = "Zephyr" |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 392 | |
David B. Kinder | 3d4f213 | 2017-09-29 11:31:46 -0700 | [diff] [blame] | 393 | # Qualifiers to a function are causing Sphihx/Breathe to warn about |
| 394 | # Error when parsing function declaration and more. This is a list |
| 395 | # of strings that the parser additionally should accept as |
| 396 | # attributes. |
David B. Kinder | de85fde | 2017-09-29 15:34:48 -0700 | [diff] [blame] | 397 | cpp_id_attributes = ['__syscall', '__syscall_inline', '__deprecated', |
| 398 | '__may_alias', '__used', '__unused', '__weak', |
| 399 | '__DEPRECATED_MACRO', 'FUNC_NORETURN' ] |
David B. Kinder | 3d4f213 | 2017-09-29 11:31:46 -0700 | [diff] [blame] | 400 | |
David B. Kinder | 11baf5c | 2017-05-18 12:34:46 -0700 | [diff] [blame] | 401 | # docs_title is used in the breadcrumb title in the zephyr docs theme |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 402 | html_context = { |
| 403 | 'show_license': html_show_license, |
Anas Nashif | 3ba693f | 2017-05-19 08:36:20 -0400 | [diff] [blame] | 404 | 'docs_title': docs_title, |
Anas Nashif | b53d697 | 2017-11-17 19:02:11 -0500 | [diff] [blame] | 405 | 'is_release': is_release, |
David B. Kinder | f3f266e | 2018-07-31 13:47:10 -0700 | [diff] [blame] | 406 | 'theme_logo_only': False, |
David B. Kinder | d47bd0b | 2018-07-26 13:30:42 -0700 | [diff] [blame] | 407 | 'current_version': version, |
| 408 | 'versions': ( ("latest", "/"), |
David B. Kinder | 23d4c5d | 2018-09-06 17:51:52 -0700 | [diff] [blame] | 409 | ("1.13.0", "/1.13.0/"), |
David B. Kinder | d47bd0b | 2018-07-26 13:30:42 -0700 | [diff] [blame] | 410 | ("1.12.0", "/1.12.0/"), |
| 411 | ("1.11.0", "/1.11.0/"), |
| 412 | ("1.10.0", "/1.10.0/"), |
| 413 | ("1.9.2", "/1.9.0/"), |
| 414 | ) |
Rodrigo Caballero | 8d7b52f | 2015-10-16 09:30:15 -0500 | [diff] [blame] | 415 | } |
Anas Nashif | b7b2318 | 2017-01-03 14:43:02 -0500 | [diff] [blame] | 416 | |
Anas Nashif | 38a7779 | 2019-01-20 08:56:48 -0500 | [diff] [blame] | 417 | |
David B. Kinder | 3d4f213 | 2017-09-29 11:31:46 -0700 | [diff] [blame] | 418 | extlinks = {'jira': ('https://jira.zephyrproject.org/browse/%s', ''), |
| 419 | 'github': ('https://github.com/zephyrproject-rtos/zephyr/issues/%s', '') |
| 420 | } |
David B. Kinder | 6bd5dff | 2017-01-27 16:20:21 -0800 | [diff] [blame] | 421 | |
David B. Kinder | 2a1adfc | 2017-04-27 14:59:04 -0700 | [diff] [blame] | 422 | # some configuration for linkcheck builder |
| 423 | # noticed that we're getting false-positive link errors on JIRA, I suspect |
| 424 | # because it's taking too long for the server to respond so bump up the |
| 425 | # timeout (default=5) and turn off anchor checks (so only a HEAD request is |
| 426 | # done - much faster) Leave the ignore commented in case we want to remove |
| 427 | # jira link checks later... |
| 428 | |
| 429 | linkcheck_timeout = 30 |
| 430 | linkcheck_workers = 10 |
| 431 | # linkcheck_ignore = [r'https://jira\.zephyrproject\.org/'] |
| 432 | linkcheck_anchors = False |
| 433 | |
David B. Kinder | 6bd5dff | 2017-01-27 16:20:21 -0800 | [diff] [blame] | 434 | def setup(app): |
| 435 | app.add_stylesheet("zephyr-custom.css") |
David B. Kinder | f3f266e | 2018-07-31 13:47:10 -0700 | [diff] [blame] | 436 | app.add_javascript("zephyr-custom.js") |