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 <SvenDowideit@fosiki.com> (github: SvenDowideit)
This commit is contained in:
parent
9d38fd0eef
commit
dc982d3053
4 changed files with 16 additions and 3 deletions
3
Makefile
3
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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
2
docs/theme/mkdocs/base.html
vendored
2
docs/theme/mkdocs/base.html
vendored
|
@ -48,7 +48,7 @@
|
|||
<div class="col-sm-8" role="main">
|
||||
{% include "breadcrumbs.html" %}
|
||||
<main id="content" role="main">
|
||||
{% include "beta_warning.html" %}
|
||||
{% include "version.html" %}
|
||||
{{ content }}
|
||||
</main>
|
||||
</div>
|
||||
|
|
9
docs/theme/mkdocs/beta_warning.html
vendored
9
docs/theme/mkdocs/beta_warning.html
vendored
|
@ -1,3 +1,4 @@
|
|||
{% if aws_bucket != "docs.docker.io" %}
|
||||
<style>
|
||||
.bs-callout {
|
||||
padding: 20px;
|
||||
|
@ -22,6 +23,10 @@
|
|||
}
|
||||
</style>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>You are looking at the <span>beta</span> docs for the development version of Docker.</h4>
|
||||
There is a chance of them being different from the prior versions.
|
||||
<h4>This is the
|
||||
<span>{% if docker_version != docker_version|replace("-dev", "bingo") %}{{ docker_branch }} development branch{% else %}beta{% endif %}</span>
|
||||
documentation for Docker version {{ docker_version }}.</h4>
|
||||
Please go to <a href="http://docs.docker.io">http://docs.docker.io</a> for the current Docker release documentation.
|
||||
{{ aws_bucket }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue