summaryrefslogtreecommitdiffstats
path: root/documentation/conf.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-07 12:44:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 10:09:34 +0100
commitad2e3e614696e098cb4ab1791cb402adaa16d033 (patch)
tree4f569bf5a63f66797c5ffb1bcd21e0f1894de377 /documentation/conf.py
parent721edcfd44a61c4ea7a88d4e46d35bbdbce99c56 (diff)
downloadpoky-ad2e3e614696e098cb4ab1791cb402adaa16d033.tar.gz
sphinx: Add support for multiple docs version
Enhance the sphinx experience/nagivation with: * Remove the pointless looking parts of breadcrumb navigtation * Add a document type switcher to the breadcrumb navigation * Add a version selection switch to the breadcrumb navigation (From yocto-docs rev: 1823624bdb9ea002d44c9e6d0fd4cd662bff36ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/conf.py')
-rw-r--r--documentation/conf.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/documentation/conf.py b/documentation/conf.py
index 546ca723a9..66af9fa060 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -12,18 +12,25 @@
12# add these directories to sys.path here. If the directory is relative to the 12# add these directories to sys.path here. If the directory is relative to the
13# documentation root, use os.path.abspath to make it absolute, like shown here. 13# documentation root, use os.path.abspath to make it absolute, like shown here.
14# 14#
15# import os 15import os
16# import sys 16import sys
17# sys.path.insert(0, os.path.abspath('.'))
18
19import datetime 17import datetime
20 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
21# -- Project information ----------------------------------------------------- 29# -- Project information -----------------------------------------------------
22project = 'The Yocto Project' 30project = 'The Yocto Project'
23copyright = '2010-%s, The Linux Foundation' % datetime.datetime.now().year 31copyright = '2010-%s, The Linux Foundation' % datetime.datetime.now().year
24author = 'The Linux Foundation' 32author = 'The Linux Foundation'
25 33
26
27# -- General configuration --------------------------------------------------- 34# -- General configuration ---------------------------------------------------
28 35
29# to load local extension from the folder 'sphinx' 36# to load local extension from the folder 'sphinx'
@@ -96,4 +103,5 @@ html_context = {
96 'css_files': [ 103 'css_files': [
97 '_static/theme_overrides.css', 104 '_static/theme_overrides.css',
98 ], 105 ],
106 'current_version': current_version,
99} 107}