mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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>
This commit is contained in:
+13
-5
@@ -12,18 +12,25 @@
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
current_version = "dev"
|
||||
|
||||
# String used in sidebar
|
||||
version = 'Version: ' + current_version
|
||||
if current_version == 'dev':
|
||||
version = 'Version: Current Development'
|
||||
# Version seen in documentation_options.js and hence in js switchers code
|
||||
release = current_version
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
project = 'The Yocto Project'
|
||||
copyright = '2010-%s, The Linux Foundation' % datetime.datetime.now().year
|
||||
author = 'The Linux Foundation'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# to load local extension from the folder 'sphinx'
|
||||
@@ -96,4 +103,5 @@ html_context = {
|
||||
'css_files': [
|
||||
'_static/theme_overrides.css',
|
||||
],
|
||||
'current_version': current_version,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user