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

yao pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 103f7fd32ade [SPARK-53472][DOCS] Fix jekyll-redirect-from template and 
generated html files
103f7fd32ade is described below

commit 103f7fd32ade4ded31ec18dfbf13b0ab04e2aa72
Author: Kent Yao <y...@apache.org>
AuthorDate: Thu Sep 4 10:37:34 2025 +0800

    [SPARK-53472][DOCS] Fix jekyll-redirect-from template and generated html 
files
    
    ### Why are the changes needed?
    
    `page.redirect.to` defaults to pages with the absolute site root. In this 
PR, we revise it to the docs relative.
    
    ### Does this PR introduce _any_ user-facing change?
    doc fix
    
    Check https://dist.apache.org/repos/dist/dev/spark/v4.0.1-rc1-docs/_site/ 
for 
https://dist.apache.org/repos/dist/dev/spark/v4.0.1-rc1-docs/_site/building-with-maven.html
    
    ### How was this patch tested?
    build docs locally.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    no
    
    Closes #52217 from yaooqinn/SPARK-53472.
    
    Authored-by: Kent Yao <y...@apache.org>
    Signed-off-by: Kent Yao <y...@apache.org>
    (cherry picked from commit 76352046c8903c5fe5eb632a0b9ddd13ede27b97)
    Signed-off-by: Kent Yao <y...@apache.org>
---
 docs/_layouts/redirect.html | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/docs/_layouts/redirect.html b/docs/_layouts/redirect.html
index 72a0462fc6a3..6177f91b7d79 100644
--- a/docs/_layouts/redirect.html
+++ b/docs/_layouts/redirect.html
@@ -19,10 +19,11 @@
 <html lang="en-US">
 <meta charset="utf-8">
 <title>Redirecting&hellip;</title>
-<link rel="canonical" href="{{ page.redirect.to }}.html">
-<script>location="{{ page.redirect.to }}.html"</script>
-<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}.html">
+{% assign redirect_url = page.redirect.to | replace_first: '/', '' | prepend: 
rel_path_to_root | append: '.html' %}
+<link rel="canonical" href="{{ redirect_url }}">
+<script>location="{{ redirect_url }}"</script>
+<meta http-equiv="refresh" content="0; url={{ redirect_url }}">
 <meta name="robots" content="noindex">
 <h1>Redirecting&hellip;</h1>
-<a href="{{ page.redirect.to }}.html">Click here if you are not redirected.</a>
-</html>
\ No newline at end of file
+<a href="{{ redirect_url }}">Click here if you are not redirected.</a>
+</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to