From 13ce2d62855ae837a72fdf21ae2311ac7dfb9c5c Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 21 Apr 2016 11:23:57 -0400 Subject: [PATCH] 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 --- doc/Makefile | 3 ++- doc/index.rst | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 7ba82baf49d..a07db810d5d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/doc/index.rst b/doc/index.rst index b51c1eace8e..aeb3fc2fe85 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -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/``, 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/