r.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. Redirection
  2. -----------
  3. This page exists for redirection purposes only.
  4. ..
  5. Include a named paragraph in the page, where the javascript code below will
  6. place any message.
  7. .. raw:: html
  8. <p><strong id="successmessage">
  9. You will be redirected to your target page in a few seconds.
  10. </strong></p>
  11. .. figure:: artwork/src/redirection.svg
  12. ..
  13. use a custom role to identify redirect codes so that a bit of JS can find
  14. them again
  15. .. role:: redirect
  16. :class: redirect
  17. If you continue to see this page, you've ended up in here accidentally and redirection
  18. failed -- sorry about this.
  19. **Here are some links that may take you to where you need to go:**
  20. ..
  21. This defines a mapping of redirect codes to their present URLs.
  22. Please keep sorted by redirection label.
  23. :redirect:`ABCD`
  24. :ref:`abcd`
  25. :redirect:`about`
  26. :ref:`executive_summary`
  27. :redirect:`book-intro-v1`
  28. :ref:`book-intro-v1`
  29. :redirect:`cheatsheet`
  30. :ref:`cheat`
  31. :redirect:`clone-priority`
  32. :ref:`cloneprio`
  33. :redirect:`containers`
  34. :ref:`containersrun`
  35. :redirect:`dataladdening`
  36. :ref:`dataladdening`
  37. :redirect:`dl-for-ml`
  38. :ref:`dvc`
  39. :redirect:`dgpa`
  40. :ref:`dgpa`
  41. :redirect:`extensions`
  42. :ref:`extensions_intro`
  43. :redirect:`filenaming`
  44. :ref:`filenaming`
  45. :redirect:`GIN`
  46. :ref:`gin`
  47. :redirect:`gobig`
  48. :ref:`chapter_gobig`
  49. :redirect:`LFS`
  50. :ref:`gitlfs`
  51. :redirect:`HCP-dataset`
  52. :ref:`usecase_HCP_dataset`
  53. :redirect:`install`
  54. :ref:`install`
  55. :redirect:`osoh`
  56. :ref:`osoh`
  57. :redirect:`reproducible-paper`
  58. :ref:`usecase_reproducible_paper`
  59. :redirect:`RIA`
  60. :ref:`riastore`
  61. :redirect:`runhpc`
  62. :ref:`runhpc`
  63. :redirect:`yoda`
  64. :ref:`yoda`
  65. :redirect:`OHBM2020`
  66. :ref:`OHBMOSR2020`
  67. :redirect:`OHBM2020poster`
  68. :ref:`ohbm2020poster`
  69. :redirect:`ml-usecase`
  70. :ref:`usecase_ML`
  71. :redirect:`openneuro`
  72. :ref:`openneuro`
  73. :redirect:`FZJmlcode`
  74. :ref:`mlcode`
  75. :redirect:`MPIBerlin`
  76. :ref:`mpiberlin`
  77. :redirect:`Yale`
  78. :ref:`yale`
  79. Alternatively, try searching in the "Quick Search" at the left-hand side, or
  80. scan the handbook's front page at `handbook.datalad.org <https://handbook.datalad.org>`_
  81. for directions.
  82. ..
  83. This code replaces the r.html?key part with the final URL, while keeping
  84. the rest of URL intact.
  85. .. raw:: html
  86. <script>
  87. // take everything after "?" as a code to identify the redirect. If there is a '=' appended (a glitch that started to surface Dec 2022), remove it and everything afterwards
  88. redirect_code = window.location.href.replace(/.*\?/, "").replace(/=.*/, "");
  89. success = false;
  90. // loop over all redirect definitions (see above)
  91. for (rd of document.getElementsByClassName('redirect')){
  92. if (rd.innerText != redirect_code) {continue;}
  93. // read the href from the link in the <dd> matching the <dt> of the redirect
  94. // this assumes a very simple, and particular structure
  95. // let's hope that sphinx doesn't break it
  96. target = rd.parentElement.nextElementSibling.getElementsByTagName("a")[0].href;
  97. // and jump
  98. window.location.replace(target);
  99. success = true;
  100. break;
  101. }
  102. // if we get here, we didn't find a match
  103. if (success == false) {
  104. document.getElementById("successmessage"
  105. ).innerHTML = "Whoops - redirection went wrong, we are lost!"
  106. }
  107. </script>