This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch release-1.0
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 76f4658597819565207357c09cb5611f6227c818
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  | 2 +-
 docs/_layouts/plain.html | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html
index 5af7b2df62a..ffb201b3a0b 100644
--- a/docs/_layouts/base.html
+++ b/docs/_layouts/base.html
@@ -75,7 +75,7 @@ under the License.
   <body>
     {% 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>.
+       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>.
     </div>
     {% endif %}
 
diff --git a/docs/_layouts/plain.html b/docs/_layouts/plain.html
index 17b426cde07..b340f29ca82 100644
--- a/docs/_layouts/plain.html
+++ b/docs/_layouts/plain.html
@@ -95,7 +95,7 @@ The plain layout with a sub navigation.
 
       {% 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>
+        <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>
       </div>
       {% endif %}
 
@@ -116,7 +116,7 @@ The plain layout without a sub navigation (only text).
     <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>
+      <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>
     </div>
     {% endif %}
 {{ content }}

Reply via email to