Skip to content

Commit f46470c

Browse files
kmk3xuhdev
authored andcommitted
default.html: remove scrollspy
Added on commit 36ad237 ("Add left menu bar nav with scrollspy support") and commit 6371fe0 ("use minified scrollspy.min.js on cdn"). From my testing on this site, Scrollspy is not working. The version that is currently used is loaded from a CDN as a standalone file (65 SLOC unminified)[1]. But on later Bootstrap versions, it does not seem to be possible to load Scrollspy by itself, as only the entire bootstrap(.bundle)(.min).js appears to be available (~3262-4501 SLOC unminified)[2][3][4]. Additionally, while Scrollspy is used on the navbar of Bootstrap's documentation up until the 3.x series[5][6], since version 4.0.0 (released on 2018-01-18), the component is no longer used[7][8]. Considering that: It's a minor convenience feature, it depends on JavaScript, the current stable version of the component requires loading jQuery + Popper + the entire Bootstrap framework[9] and since Bootstrap themselves stopped using it, put it to rest as well. As a bonus, this makes jQuery no longer needed, so remove it too. [1] https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/1.4.0/js/bootstrap-scrollspy.min.js [2] https://cdnjs.com/libraries/twitter-bootstrap/2.0.0 [3] https://cdnjs.com/libraries/twitter-bootstrap/4.6.0 [4] https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js [5] https://getbootstrap.com/docs/versions/ [6] https://getbootstrap.com/docs/3.4/javascript/#scrollspy [7] https://getbootstrap.com/docs/4.0/components/scrollspy/ [8] https://getbootstrap.com/docs/5.0/components/scrollspy/ [9] https://getbootstrap.com/docs/4.6/getting-started/introduction/
1 parent 488f334 commit f46470c

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

_layouts/default.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<a class="logo" href="{{ site.baseurl }}/"><img itemprop="logo" src="{{ site.baseurl }}/logo.png" alt="EditorConfig mouse head"></a>
2828
</div>
2929
<nav>
30-
<ol data-scrollspy="scrollspy">
30+
<ol>
3131
<li><a href="{{ site.baseurl }}/#overview">What is EditorConfig?</a></li>
3232
<li><a href="{{ site.baseurl }}/#example-file">Example File</a></li>
3333
<li><a href="{{ site.baseurl }}/#file-location">File Location</a></li>
@@ -79,9 +79,6 @@ <h1>EditorConfig</h1>
7979
</div>
8080
</div>
8181

82-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
83-
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/1.4.0/js/bootstrap-scrollspy.min.js"></script>
84-
8582
{% if jekyll.environment == "production" %}
8683
<script type="text/javascript">
8784

0 commit comments

Comments
 (0)