This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 6c1c512bbf5c [SPARK-53472][DOCS] Fix jekyll-redirect-from template and
generated html files
6c1c512bbf5c is described below
commit 6c1c512bbf5c8d1c5263b23c219bf3dcab7f3a3c
Author: Kent Yao <[email protected]>
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 <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 76352046c8903c5fe5eb632a0b9ddd13ede27b97)
Signed-off-by: Kent Yao <[email protected]>
---
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…</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…</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: [email protected]
For additional commands, e-mail: [email protected]