This is an automated email from the ASF dual-hosted git repository. martijnvisser pushed a commit to branch release-1.12 in repository https://gitbox.apache.org/repos/asf/flink.git
commit d9d869a6dde198de77b8acb28a70ad5d17371e89 Author: Martijn Visser <[email protected]> AuthorDate: Tue Jan 20 10:37:46 2026 +0100 [FLINK-38914][docs] Preserve page path when linking to stable version The "stable version" link in the warning banner for unreleased/out-of-date docs now redirects to the equivalent page in the stable docs instead of always redirecting to the homepage. --- docs/_layouts/base.html | 4 ++-- docs/_layouts/plain.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html index 8d56d34af76..4809a9e3a49 100644 --- a/docs/_layouts/base.html +++ b/docs/_layouts/base.html @@ -77,9 +77,9 @@ under the License. {% 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"> {% if page.language == "en" %} - This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="https://ci.apache.org/projects/flink/flink-docs-stable/">the latest stable version</a>. + This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="{{ site.stable_baseurl }}{{ page.url | replace:'index.html','' }}">the latest stable version</a>. {% else if page.language == "zh" %} - 本文档是 Apache Flink 的旧版本。建议访问 <a href="https://ci.apache.org/projects/flink/flink-docs-stable/zh">最新的稳定版本</a>。 + 本文档是 Apache Flink 的旧版本。建议访问 <a href="{{ site.stable_baseurl }}{{ page.url | replace:'index.html','' }}">最新的稳定版本</a>。 {% endif %} </div> {% endif %} diff --git a/docs/_layouts/plain.html b/docs/_layouts/plain.html index bcde9f2dda6..0f8c738d76a 100644 --- a/docs/_layouts/plain.html +++ b/docs/_layouts/plain.html @@ -56,9 +56,9 @@ under the License. {% if site.show_outdated_warning %} <div class="alert alert-danger" role="alert"> {%- if page.language == "en" %} - <strong>This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="https://ci.apache.org/projects/flink/flink-docs-stable/">the latest stable version</a>.</strong> + <strong>This documentation is for an out-of-date version of Apache Flink. We recommend you use <a href="https://nightlies.apache.org/flink/flink-docs-stable{{ page.url }}">the latest stable version</a>.</strong> {%- else if page.language == "zh" %} - <strong>本文档是 Apache Flink 的旧版本。建议访问 <a href="https://ci.apache.org/projects/flink/flink-docs-stable/zh">最新的稳定版本</a>。</strong> + <strong>本文档是 Apache Flink 的旧版本。建议访问 <a href="https://nightlies.apache.org/flink/flink-docs-stable{{ page.url }}">最新的稳定版本</a>。</strong> {%- endif %} </div> {%- endif %}
