doc: show information about documentation current version

show different information based on the state of the current
documentation and link to development version and released
versions depending on where the user lands.

Change-Id: Ifa6263900222db483efa0388e2588dd97222ecb6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2016-04-21 11:23:57 -04:00 committed by Anas Nashif
commit 13ce2d6285
2 changed files with 21 additions and 2 deletions

View file

@ -6,6 +6,7 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
DOC_TAG ?= development
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
@ -66,7 +67,7 @@ kconfig: scripts/genrest/genrest.py
srctree=../ SRCARCH=x86 python $< ../Kconfig reference/kconfig/
html: kconfig
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
$(SPHINXBUILD) -t $(DOC_TAG) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@mkdir -p $(BUILDDIR)/html/api
@cp -a html $(BUILDDIR)/html/api
@echo

View file

@ -4,7 +4,23 @@
Zephyr Project Documentation
############################
Welcome to the Zephyr Project's documentation version |version|!
.. only:: release
Welcome to the Zephyr Project's documentation version |version|!
Documentation for the development branch of Zephyr can be found at
https://www.zephyrproject.org/doc/dev/
.. only:: development
Welcome to the Zephyr Project's documentation. This is the documentation of the
master tree under development.
Documentation for released versions of Zephyr can be found at
``https://www.zephyrproject.org/doc/<version>``, for example:
* Documentation for `Zephyr 1.2.0`_
* Documentation for `Zephyr 1.1.0`_
Sections
********
@ -34,3 +50,5 @@ Indices and Tables
* :ref:`search`
.. _Zephyr Project Wiki: https://wiki.zephyrproject.org/view/Main_Page
.. _Zephyr 1.2.0: https://www.zephyrproject.org/doc/1.2.0/
.. _Zephyr 1.1.0: https://www.zephyrproject.org/doc/1.1.0/