Skip to content

Commit

Permalink
[FLINK-7462] [docs] Add very obvious warning about outdated docs
Browse files Browse the repository at this point in the history
This closes apache#4553.
  • Loading branch information
uce authored and twalthr committed Aug 17, 2017
1 parent 843f0cb commit 6c6d900
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ download_url: "http://flink.apache.org/downloads.html"
# please use a protocol relative URL here
baseurl: //ci.apache.org/projects/flink/flink-docs-release-1.4

# Flag whether this is the latest stable version or not. If not, a warning
# will be printed pointing to the docs of the latest stable version.
is_latest: true
# Flag whether this is a stable version or not. Used for the quickstart page.
is_stable: false

# Flag to indicate whether an outdated warning should be shown.
show_outdated_warning: false

previous_docs:
1.3: http://ci.apache.org/projects/flink/flink-docs-release-1.3
1.2: http://ci.apache.org/projects/flink/flink-docs-release-1.2
Expand Down
6 changes: 2 additions & 4 deletions docs/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@
<![endif]-->
</head>
<body>
{% if site.is_stable %}
{% unless site.is_latest %}
<div style="position:fixed; bottom:0; left:0; z-index:99999; width:100%; text-align:center; padding:15px; border-top:1px dashed #CE4B65; background:#f6f0e3; font-weight:bold">
{% if site.show_outdated_warning %}
<div style="position:fixed; bottom:0; left:0; z-index:99999; width:100%; text-align:center; padding:15px; border-top:5px solid #ECCCD1; background:#F2DEDE; color:#AD433F; font-weight:bold">
This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="https://flink.apache.org/q/stable-docs.html">the latest stable version</a>.
</div>
{% endunless %}
{% endif %}

<!-- Main content. -->
Expand Down
5 changes: 5 additions & 0 deletions docs/_layouts/plain.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@
</ol>

<h1>{{ page.title }}{% if page.is_beta %} <span class="beta">Beta</span>{% endif %}</h1>
{% if site.show_outdated_warning %}
<div class="alert alert-danger" role="alert">
<strong>This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="https://flink.apache.org/q/stable-docs.html">the latest stable version</a>.</strong>
</div>
{% endif %}

{{ content }}

0 comments on commit 6c6d900

Please sign in to comment.