conf.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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). this will be
  62. # overridden by command line option but we can provide a sane default
  63. # this way
  64. html_context = dict()
  65. html_context["nuttx_versions"] = "latest"
  66. # TODO: append other options using releases detected from git (or maybe just
  67. # a few hand-selected ones, or maybe just a "stable" option)
  68. # -- Options for HTML output -------------------------------------------------
  69. # The theme to use for HTML and HTML Help pages. See the documentation for
  70. # a list of builtin themes.
  71. #
  72. html_theme = "sphinx_rtd_theme"
  73. html_show_sphinx = False
  74. html_theme_options = {"navigation_depth": 5}
  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 = ["custom.css"]
  80. html_show_license = True
  81. html_logo = "_static/NuttX.png"
  82. html_favicon = "_static/favicon.ico"
  83. today_fmt = "%d %B %y at %H:%M"
  84. c_id_attributes = ["FAR", "CODE", "noreturn_function"]
  85. # This is required to allow running linkcheck with sphinx-tabs
  86. sphinx_tabs_valid_builders = ["linkcheck"]
  87. # There are some sites where the linkchecker cannot handle anchors
  88. linkcheck_ignore = [
  89. "https://github.com/pyenv/pyenv#installation",
  90. "http://openocd.zylin.com/#/c/4103/",
  91. ]