Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-45098][DOCS] Custom jekyll-rediect-from redirect.html template to fix doc redirecting #42848

Closed
wants to merge 1 commit into from

Conversation

yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Sep 7, 2023

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.

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.

<!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

@github-actions github-actions bot added the DOCS label Sep 7, 2023
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @yaooqinn .

I verified locally that it has .html extension after this PR.

<link rel="canonical" href="http://localhost:4000/building-spark.html">
<script>location="http://localhost:4000/building-spark.html"</script>
<meta http-equiv="refresh" content="0; url=http://localhost:4000/building-spark.html">

dongjoon-hyun pushed a commit that referenced this pull request Sep 8, 2023
… 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 <yao@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 81bc38e)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@dongjoon-hyun
Copy link
Member

Merged to master/3.5.

@yaooqinn
Copy link
Member Author

yaooqinn commented Sep 9, 2023

thank you @srowen and @dongjoon-hyun

@yaooqinn yaooqinn deleted the SPARK-45098 branch September 11, 2023 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants