jorisvandenbossche commented on a change in pull request #12172:
URL: https://github.com/apache/arrow/pull/12172#discussion_r787655327



##########
File path: r/pkgdown/extra.js
##########
@@ -59,6 +77,45 @@
       var empty_ul = $("#toc").find("ul").filter(":empty");
       empty_ul.remove();
     });
+
+    $(document).ready(function () {
+  
+      /**
+       * This replaces the package version number in the docs with a
+       * dropdown where you can select the version of the docs to view.
+       */
+
+        $pathStart = function(){
+         return window.location.origin + "/docs/";
+        }
+
+        $pathEnd  = function(){
+         var current_path = window.location.pathname;
+         return current_path.match("(?<=\/r).*");
+        }
+
+        // Load the versions JSON and construct the select items
+        $.getJSON("./versions.json", function( data ) {

Review comment:
       So does that mean that if you are on a page like 
https://arrow.apache.org/docs/5.0/r/articles/developing.html, that would point 
to https://arrow.apache.org/docs/5.0/r/versions.json? (taking the last /r, and 
appending versions.json)
   
   Because then it still points to the versions.json of that version, and not 
the latest one (which can be updated)




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

To unsubscribe, e-mail: [email protected]

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


Reply via email to