Compare commits
6 Commits
v2.2.0
...
v1.5-branc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77908ed995 | ||
|
|
1d6259edc9 | ||
|
|
12784125b9 | ||
|
|
bc038e5e78 | ||
|
|
68cf168798 | ||
|
|
69bddff823 |
66
doc/conf.py
66
doc/conf.py
@@ -52,14 +52,32 @@ project = u'Zephyr Project'
|
||||
copyright = u'2015, Intel Corporation, Wind River Systems, Inc'
|
||||
author = u'many'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = os.getenv('KERNELVERSION','0.1.0')
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = os.getenv('KERNELVERSION','0.1.0')
|
||||
|
||||
# The following code tries to extract the information by reading the Makefile,
|
||||
# when Sphinx is run directly (e.g. by Read the Docs).
|
||||
try:
|
||||
makefile_version_major = None
|
||||
makefile_version_minor = None
|
||||
makefile_patchlevel = None
|
||||
for line in open('../Makefile'):
|
||||
key, val = [x.strip() for x in line.split('=', 2)]
|
||||
if key == 'VERSION_MAJOR':
|
||||
makefile_version_major = val
|
||||
if key == 'VERSION_MINOR':
|
||||
makefile_version_minor = val
|
||||
elif key == 'PATCHLEVEL':
|
||||
makefile_patchlevel = val
|
||||
if makefile_version_major and makefile_version_minor and makefile_patchlevel:
|
||||
break
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
if makefile_version_major and makefile_version_minor and makefile_patchlevel:
|
||||
version = release = makefile_version_major + '.' + makefile_version_minor + '.' + makefile_patchlevel
|
||||
else:
|
||||
sys.stderr.write('Warning: Could not extract kernel version\n')
|
||||
version = release = "unknown version"
|
||||
version = release = os.getenv('KERNELVERSION','0.1.0')
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@@ -112,18 +130,25 @@ rst_epilog = """
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#html_theme = 'alabaster'
|
||||
html_theme = 'zephyr'
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
except ImportError:
|
||||
html_theme = 'zephyr'
|
||||
html_theme_path = ['./themes']
|
||||
else:
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
if tags.has('daily') or tags.has('release'):
|
||||
html_theme = 'zephyr-docs-theme'
|
||||
html_theme_path = ['./themes']
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['./themes']
|
||||
if tags.has('release'):
|
||||
is_release = True
|
||||
docs_title = 'Docs / %s' %(version)
|
||||
else:
|
||||
is_release = False
|
||||
docs_title = 'Docs'
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
@@ -186,7 +211,7 @@ html_split_index = True
|
||||
html_show_sphinx = False
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
html_show_copyright = True
|
||||
html_show_copyright = tags.has('development')
|
||||
|
||||
# If true, license is shown in the HTML footer. Default is True.
|
||||
html_show_license = True
|
||||
@@ -303,6 +328,9 @@ breathe_projects = {
|
||||
}
|
||||
breathe_default_project = "Zephyr"
|
||||
|
||||
# docs_title is used in the breadcrumb title in the zephyr docs theme
|
||||
html_context = {
|
||||
'show_license': html_show_license,
|
||||
'docs_title': docs_title,
|
||||
'is_release': is_release,
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ Zephyr Project Documentation
|
||||
Documentation for the development branch of Zephyr can be found at
|
||||
https://www.zephyrproject.org/doc/
|
||||
|
||||
.. only:: development
|
||||
.. only:: (development or daily)
|
||||
|
||||
Welcome to the Zephyr Project's documentation. This is the documentation of the
|
||||
master tree under development.
|
||||
master tree under development (version |version|).
|
||||
|
||||
Documentation for released versions of Zephyr can be found at
|
||||
``https://www.zephyrproject.org/doc/<version>``. The following documentation
|
||||
|
||||
Reference in New Issue
Block a user