Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/_layouts/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
// Note: AnchorJS 4.0+ excludes h1 from the default selector, but many
// Spark doc pages use h1 for section headings, so we include it explicitly.
anchors.add('h1, h2, h3, h4, h5, h6');
</script>
<script src="{{ rel_path_to_root}}js/main.js"></script>

<script type="text/javascript" src="{{ rel_path_to_root }}js/vendor/docsearch.min.js"></script>
Expand Down
8 changes: 1 addition & 7 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

/* global $, anchors */
/* global $ */

/* Custom JavaScript code in the MarkDown docs */

Expand Down Expand Up @@ -89,12 +89,6 @@ function codeTabs() {

$(function() {
codeTabs();
// Display anchor links when hovering over headers. For documentation of the
// configuration options, see the AnchorJS documentation.
anchors.options = {
placement: 'right'
};
anchors.add();

// Make dropdown menus in nav bars show on hover instead of click
// using solution at https://webdesign.tutsplus.com/tutorials/how-
Expand Down
15 changes: 9 additions & 6 deletions docs/js/vendor/anchor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion licenses/LICENSE-AnchorJS.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) <year> <copyright holders>
Copyright (c) 2023 Bryan Braun

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down