This is an automated email from the ASF dual-hosted git repository. martijnvisser pushed a commit to branch release-2.1 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 7e84986840e8ada1cfdd4e14e7d81f72cf8606c4 Author: Martijn Visser <[email protected]> AuthorDate: Mon Dec 29 13:08:42 2025 +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/partials/docs/inject/content-before.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/layouts/partials/docs/inject/content-before.html b/docs/layouts/partials/docs/inject/content-before.html index bfbea6ce7ab..35d7dde271f 100644 --- a/docs/layouts/partials/docs/inject/content-before.html +++ b/docs/layouts/partials/docs/inject/content-before.html @@ -20,16 +20,18 @@ under the License. Partial that renders before the content on every page. --> {{ if $.Site.Params.ShowOutDatedWarning }} +{{ $stableURL := replaceRE "/flink-docs-[^/]+/" "/flink-docs-stable/" .Permalink }} <article class="markdown"> <blockquote style="border-color:#f66"> - {{ markdownify "This documentation is for an out-of-date version of Apache Flink. We recommend you use the latest [stable version](https://nightlies.apache.org/flink/flink-docs-stable/)."}} + {{ markdownify (printf "This documentation is for an out-of-date version of Apache Flink. We recommend you use the latest [stable version](%s)." $stableURL) }} </blockquote> </article> {{ end }} {{ if (not $.Site.Params.IsStable) }} +{{ $stableURL := replaceRE "/flink-docs-[^/]+/" "/flink-docs-stable/" .Permalink }} <article class="markdown"> <blockquote style="border-color:#f66"> - {{ markdownify "This documentation is for an unreleased version of Apache Flink. We recommend you use the latest [stable version](https://nightlies.apache.org/flink/flink-docs-stable/)."}} + {{ markdownify (printf "This documentation is for an unreleased version of Apache Flink. We recommend you use the latest [stable version](%s)." $stableURL) }} </blockquote> </article> {{ end }}
