From 9d38fd0eefb2df0bf087a67fad2ad852f28e2e96 Mon Sep 17 00:00:00 2001 From: "O.S.Tezer" Date: Fri, 18 Apr 2014 00:20:18 +0300 Subject: [PATCH 1/2] Development docs warning for beta-docs.docker.io Update: Fix alignment issues of the "warning" block. Docker-DCO-1.1-Signed-off-by: O.S. Tezer (github: ostezer) Docker-DCO-1.1-Signed-off-by: O.S.Tezer (github: SvenDowideit) --- docs/theme/mkdocs/base.html | 1 + docs/theme/mkdocs/beta_warning.html | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 docs/theme/mkdocs/beta_warning.html diff --git a/docs/theme/mkdocs/base.html b/docs/theme/mkdocs/base.html index 766afc0c8a..6f396e044a 100644 --- a/docs/theme/mkdocs/base.html +++ b/docs/theme/mkdocs/base.html @@ -48,6 +48,7 @@
{% include "breadcrumbs.html" %}
+ {% include "beta_warning.html" %} {{ content }}
diff --git a/docs/theme/mkdocs/beta_warning.html b/docs/theme/mkdocs/beta_warning.html new file mode 100644 index 0000000000..943633e250 --- /dev/null +++ b/docs/theme/mkdocs/beta_warning.html @@ -0,0 +1,27 @@ + +
+

You are looking at the beta docs for the development version of Docker.

+There is a chance of them being different from the prior versions. +
From dc982d3053bf46e03ad27c29d4662a9d5ba5e819 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 23 Apr 2014 16:28:06 +1000 Subject: [PATCH 2/2] make the non-release doc warning conditional and add version info use the beta-warning area to tell the user what VERSION of docker, git branch, and links to the official release version docs are. requires / extends PR #5272 Docker-DCO-1.1-Signed-off-by: Sven Dowideit (github: SvenDowideit) --- Makefile | 3 +++ docs/Dockerfile | 5 +++++ docs/theme/mkdocs/base.html | 2 +- docs/theme/mkdocs/beta_warning.html | 9 +++++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d358678223..e020c14eac 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,9 @@ build: bundles docker build -t "$(DOCKER_IMAGE)" . docs-build: + cp ./VERSION docs/VERSION + echo "$(GIT_BRANCH)" > docs/GIT_BRANCH + echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET docker build -t "$(DOCKER_DOCS_IMAGE)" docs bundles: diff --git a/docs/Dockerfile b/docs/Dockerfile index d832dcb798..9b968ca847 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -39,6 +39,11 @@ WORKDIR /docs #convert to markdown #RUN ./convert.sh +RUN VERSION=$(cat /docs/VERSION) &&\ + GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\ + AWS_S3_BUCKET=$(cat /docs/AWS_S3_BUCKET) &&\ + echo "{% set docker_version = \"${VERSION}\" %}{% set docker_branch = \"${GIT_BRANCH}\" %}{% set aws_bucket = \"${AWS_S3_BUCKET}\" %}{% include \"beta_warning.html\" %}" > /docs/theme/mkdocs/version.html + # note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525 EXPOSE 8000 diff --git a/docs/theme/mkdocs/base.html b/docs/theme/mkdocs/base.html index 6f396e044a..5371569596 100644 --- a/docs/theme/mkdocs/base.html +++ b/docs/theme/mkdocs/base.html @@ -48,7 +48,7 @@
{% include "breadcrumbs.html" %}
- {% include "beta_warning.html" %} + {% include "version.html" %} {{ content }}
diff --git a/docs/theme/mkdocs/beta_warning.html b/docs/theme/mkdocs/beta_warning.html index 943633e250..b7ffd28a9a 100644 --- a/docs/theme/mkdocs/beta_warning.html +++ b/docs/theme/mkdocs/beta_warning.html @@ -1,3 +1,4 @@ +{% if aws_bucket != "docs.docker.io" %}
-

You are looking at the beta docs for the development version of Docker.

-There is a chance of them being different from the prior versions. +

This is the + {% if docker_version != docker_version|replace("-dev", "bingo") %}{{ docker_branch }} development branch{% else %}beta{% endif %} + documentation for Docker version {{ docker_version }}.

+ Please go to http://docs.docker.io for the current Docker release documentation. + {{ aws_bucket }}
+{% endif %}