conf.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ##############################################################################
  2. # Documentation/conf.py
  3. #
  4. # Licensed to the Apache Software Foundation (ASF) under one or more
  5. # contributor license agreements. See the NOTICE file distributed with
  6. # this work for additional information regarding copyright ownership. The
  7. # ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance with the
  9. # License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. # License for the specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. ##############################################################################
  20. # Configuration file for the Sphinx documentation builder.
  21. #
  22. # This file only contains a selection of the most common options. For a full
  23. # list see the documentation:
  24. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  25. # -- Path setup --------------------------------------------------------------
  26. # If extensions (or modules to document with autodoc) are in another directory,
  27. # add these directories to sys.path here. If the directory is relative to the
  28. # documentation root, use os.path.abspath to make it absolute, like shown here.
  29. #
  30. # import os
  31. # import sys
  32. # sys.path.insert(0, os.path.abspath('.'))
  33. # -- Project information -----------------------------------------------------
  34. project = 'NuttX'
  35. copyright = '2020, The Apache Software Foundation'
  36. author = 'NuttX community'
  37. version = release = 'latest'
  38. # -- General configuration ---------------------------------------------------
  39. # Add any Sphinx extension module names here, as strings. They can be
  40. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  41. # ones.
  42. extensions = [
  43. "sphinx_rtd_theme",
  44. "m2r2",
  45. 'sphinx.ext.autosectionlabel',
  46. 'sphinx.ext.todo',
  47. 'sphinx_tabs.tabs'
  48. ]
  49. source_suffix = [ '.rst', '.md' ]
  50. todo_include_todos = True
  51. autosectionlabel_prefix_document = True
  52. # do not set Python as primary domain for code blocks
  53. highlight_language = "none"
  54. primary_domain = None
  55. # Add any paths that contain templates here, relative to this directory.
  56. templates_path = ['_templates']
  57. # List of patterns, relative to source directory, that match files and
  58. # directories to ignore when looking for source files.
  59. # This pattern also affects html_static_path and html_extra_path.
  60. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  61. # list of documentation versions to offer (besides latest)
  62. html_context = dict()
  63. html_context['nuttx_versions'] = ['latest']
  64. # TODO: append other options using releases detected from git (or maybe just
  65. # a few hand-selected ones, or maybe just a "stable" option)
  66. # -- Options for HTML output -------------------------------------------------
  67. # The theme to use for HTML and HTML Help pages. See the documentation for
  68. # a list of builtin themes.
  69. #
  70. html_theme = 'sphinx_rtd_theme'
  71. html_show_sphinx = False
  72. html_theme_options = {
  73. 'prev_next_buttons_location': None
  74. }
  75. # Add any paths that contain custom static files (such as style sheets) here,
  76. # relative to this directory. They are copied after the builtin static files,
  77. # so a file named "default.css" will overwrite the builtin "default.css".
  78. html_static_path = ['_static']
  79. html_css_files = [
  80. 'custom.css'
  81. ]
  82. html_show_license = True
  83. html_logo = '_static/NuttX.png'
  84. html_favicon = '_static/favicon.ico'
  85. today_fmt = '%d %B %y at %H:%M'
  86. c_id_attributes = [
  87. 'FAR',
  88. 'CODE',
  89. 'noreturn_function'
  90. ]
  91. # This is required to allow running linkcheck with sphinx-tabs
  92. sphinx_tabs_valid_builders = ['linkcheck']
  93. # There are some sites where the linkchecker cannot handle anchors
  94. linkcheck_ignore = [
  95. 'https://github.com/pyenv/pyenv#installation',
  96. 'http://openocd.zylin.com/#/c/4103/',
  97. ]