nchammas commented on code in PR #59547:
URL: https://github.com/apache/spark/pull/59547#discussion_r4334329620
##########
docs/_layouts/global.html:
##########
@@ -196,7 +196,18 @@ <h1 class="title">{{ page.title }}</h1>
<script src="{{ rel_path_to_root }}js/vendor/jquery.min.js"></script>
<script src="{{ rel_path_to_root
}}js/vendor/bootstrap.bundle.min.js"></script>
- <script src="{{ rel_path_to_root }}js/vendor/anchor.min.js"></script>
+ <script src="{{ rel_path_to_root }}js/vendor/anchor.min.js">
+ // Keep the version of AnchorJS used here in sync with what's used
on the main website.
+ // See:
https://github.com/apache/spark-website/blob/asf-site/js/vendor/anchor.min.js
+ </script>
+ <script>
+ // Display anchor links when hovering over headings.
+ // See: https://www.bryanbraun.com/anchorjs/
+ anchors.options = { placement: 'right' };
Review Comment:
We already include other libraries in `global.html`, like jQuery, MathJax,
and DocSearch, which is why I moved AnchorJS there. I think the correct fix
here is in a follow-up PR to add HTML linting via `eslint-plugin-html`.
##########
docs/_layouts/global.html:
##########
@@ -196,7 +196,18 @@ <h1 class="title">{{ page.title }}</h1>
<script src="{{ rel_path_to_root }}js/vendor/jquery.min.js"></script>
<script src="{{ rel_path_to_root
}}js/vendor/bootstrap.bundle.min.js"></script>
- <script src="{{ rel_path_to_root }}js/vendor/anchor.min.js"></script>
+ <script src="{{ rel_path_to_root }}js/vendor/anchor.min.js">
Review Comment:
Addressed.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]