conf.py 3.3 KB

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