kokes commented on a change in pull request #31770:
URL: https://github.com/apache/spark/pull/31770#discussion_r589275886



##########
File path: python/docs/source/conf.py
##########
@@ -177,7 +177,24 @@
 # Add any extra paths that contain custom files (such as robots.txt or
 # .htaccess) here, relative to this directory. These files are copied
 # directly to the root of the documentation.
-#html_extra_path = []
+redirects_dir = 'redirects'
+html_extra_path = [redirects_dir]
+
+os.makedirs(redirects_dir, exist_ok=True)
+for moved_page in ['', '.ml', '.mllib', '.sql', '.streaming']:
+    moved_file = f'pyspark{moved_page}.html'

Review comment:
       Oh, I didn't know we'd want to redirect anchor links as well.
   
   In that case we'll have to dive into JavaScript, because the `<meta>` 
redirect cannot touch anchor values and convert them into paths (and the linked 
extension cannot do so either, as far as I can tell).
   
   I'll submit a patch shortly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to