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