conf.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Configuration file for the Sphinx documentation builder.
  2. #
  3. # This file only contains a selection of the most common options. For a full
  4. # list see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- Path setup --------------------------------------------------------------
  7. # If extensions (or modules to document with autodoc) are in another directory,
  8. # add these directories to sys.path here. If the directory is relative to the
  9. # documentation root, use os.path.abspath to make it absolute, like shown here.
  10. #
  11. # import os
  12. # import sys
  13. # sys.path.insert(0, os.path.abspath('.'))
  14. import sys
  15. import datetime
  16. current_version = "dev"
  17. # String used in sidebar
  18. version = 'Version: ' + current_version
  19. if current_version == 'dev':
  20. version = 'Version: Current Development'
  21. # Version seen in documentation_options.js and hence in js switchers code
  22. release = current_version
  23. # -- Project information -----------------------------------------------------
  24. project = 'Bitbake'
  25. copyright = '2004-%s, Richard Purdie, Chris Larson, and Phil Blundell' \
  26. % datetime.datetime.now().year
  27. author = 'Richard Purdie, Chris Larson, and Phil Blundell'
  28. # external links and substitutions
  29. extlinks = {
  30. 'yocto_docs': ('https://docs.yoctoproject.org%s', None),
  31. 'oe_lists': ('https://lists.openembedded.org%s', None),
  32. }
  33. # -- General configuration ---------------------------------------------------
  34. # Add any Sphinx extension module names here, as strings. They can be
  35. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  36. # ones.
  37. extensions = [
  38. 'sphinx.ext.autosectionlabel',
  39. 'sphinx.ext.extlinks',
  40. ]
  41. autosectionlabel_prefix_document = True
  42. # Add any paths that contain templates here, relative to this directory.
  43. templates_path = ['_templates']
  44. # List of patterns, relative to source directory, that match files and
  45. # directories to ignore when looking for source files.
  46. # This pattern also affects html_static_path and html_extra_path.
  47. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  48. # master document name. The default changed from contents to index. so better
  49. # set it ourselves.
  50. master_doc = 'index'
  51. # create substitution for project configuration variables
  52. rst_prolog = """
  53. .. |project_name| replace:: %s
  54. .. |copyright| replace:: %s
  55. .. |author| replace:: %s
  56. """ % (project, copyright, author)
  57. # -- Options for HTML output -------------------------------------------------
  58. # The theme to use for HTML and HTML Help pages. See the documentation for
  59. # a list of builtin themes.
  60. #
  61. try:
  62. import sphinx_rtd_theme
  63. html_theme = 'sphinx_rtd_theme'
  64. except ImportError:
  65. sys.stderr.write("The Sphinx sphinx_rtd_theme HTML theme was not found.\
  66. \nPlease make sure to install the sphinx_rtd_theme python package.\n")
  67. sys.exit(1)
  68. # Add any paths that contain custom static files (such as style sheets) here,
  69. # relative to this directory. They are copied after the builtin static files,
  70. # so a file named "default.css" will overwrite the builtin "default.css".
  71. html_static_path = ['sphinx-static']
  72. # Add customm CSS and JS files
  73. html_css_files = ['theme_overrides.css']
  74. html_js_files = ['switchers.js']
  75. # Hide 'Created using Sphinx' text
  76. html_show_sphinx = False
  77. # Add 'Last updated' on each page
  78. html_last_updated_fmt = '%b %d, %Y'
  79. # Remove the trailing 'dot' in section numbers
  80. html_secnumber_suffix = " "