2 Javascript used in lesson and workshop pages.
4 <script src="{{ page.root }}/assets/js/jquery.min.js"></script>
5 <script src="{{ page.root }}/assets/js/bootstrap.min.js"></script>
6 <script src="{{ page.root }}/assets/js/lesson.js"></script>
8 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
9 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
10 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
11 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
12 ga('create', 'UA-37305346-2', 'auto');
13 ga('send', 'pageview');
16 // This snippet fixes a bug caused by Github's pages-gem using kramdown v1.11.1.
17 // In order for anchor links to point to the correct place in the glossary, they must have an id
18 // This snippet ensures every definition term has an id
19 // See https://github.com/swcarpentry/styles/pull/129
20 $('dt').each(function () {
22 var id = $(this).text();
23 // If there's a ( in the name (e.g., "comma-separated values (CSV)") - just take everything up to the first (
24 var index = id.indexOf('(');
26 id = id.substring(0, index);
28 // Strip leading and trailing whitespace, convert spaces to dashes and convert everything to lowercase
29 id = id.trim().replace(/ /g, '-').toLowerCase();