jorisvandenbossche commented on a change in pull request #12172: URL: https://github.com/apache/arrow/pull/12172#discussion_r787639255
########## 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: Yeah, this part is annoying to test with an absolute url before it's actually deployed .. :) But, I think an absolute url is probably the easiest for now. I would maybe not put it in /docs/r/versions.json, as that is the stable docs location (it would get overwritten when doing a release and recreating the stable docs). Unless the file is not included in the actual arrow repo, and only in the arrow-site repo. Although I see now that I actually did the same for the sphinx site ... :) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org