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

dongjoon 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 066217534c2 [SPARK-45098][DOCS] Custom jekyll-rediect-from 
redirect.html template to fix doc redirecting
066217534c2 is described below

commit 066217534c2a06a34f4d7334db4be7815ee0cefc
Author: Kent Yao <y...@apache.org>
AuthorDate: Fri Sep 8 10:24:18 2023 -0700

    [SPARK-45098][DOCS] Custom jekyll-rediect-from redirect.html template to 
fix doc redirecting
    
    ### What changes were proposed in this pull request?
    
    In https://dist.apache.org/repos/dist/dev/spark/v3.5.0-rc4-docs/_site/, 
these links are supposed to redirect to the correct targets, but failed because 
there are no `.html` extensions.
    
    - 
[building-with-maven.html](https://dist.apache.org/repos/dist/dev/spark/v3.5.0-rc4-docs/_site/building-with-maven.html)
   ---> 
[building-spark.html](https://dist.apache.org/repos/dist/dev/spark/v3.5.0-rc4-docs/_site/building-spark.html)
    - 
[sql-reference.html](https://dist.apache.org/repos/dist/dev/spark/v3.5.0-rc4-docs/_site/sql-reference.html)
 ---> 
[sql-ref.html](https://dist.apache.org/repos/dist/dev/spark/v3.5.0-rc4-docs/_site/sql-ref.html)
    
    This PR customs the redirect template to add extensions to fix this issue. 
Referencing 
https://github.com/jekyll/jekyll-redirect-from#customizing-the-redirect-template
    
    ### Why are the changes needed?
    
    Fix doc links, such as 
https://spark.apache.org/docs/latest/sql-reference.html
    
    ### Does this PR introduce _any_ user-facing change?
    
    no
    
    ### How was this patch tested?
    
    Build doc and verify locally.
    
    ```html
    <!DOCTYPE html>
    <html lang="en-US">
    <meta charset="utf-8">
    <title>Redirecting&hellip;</title>
    <link rel="canonical" href="/building-spark.html">
    <script>location="/building-spark.html"</script>
    <meta http-equiv="refresh" content="0; url=/building-spark.html">
    <meta name="robots" content="noindex">
    <h1>Redirecting&hellip;</h1>
    <a href="/building-spark.html">Click here if you are not redirected.</a>
    </html>%
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    no
    
    Closes #42848 from yaooqinn/SPARK-45098.
    
    Authored-by: Kent Yao <y...@apache.org>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
    (cherry picked from commit 81bc38ee87769bbc52a677853e53293cf9601210)
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 docs/_layouts/redirect.html | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/docs/_layouts/redirect.html b/docs/_layouts/redirect.html
new file mode 100644
index 00000000000..72a0462fc6a
--- /dev/null
+++ b/docs/_layouts/redirect.html
@@ -0,0 +1,28 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE html>
+<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">
+<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


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

Reply via email to