44< script src ="{{ relative_root_path }}/assets/js/jquery.min.js "> </ script >
55< script src ="{{ relative_root_path }}/assets/js/bootstrap.min.js "> </ script >
66< script src ="{{ relative_root_path }}/assets/js/lesson.js "> </ script >
7+
8+ {% if site.kind == "lesson" %}
9+ <!-- Matomo -->
710< 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' ) ;
14- </ script >
11+ var _paq = window . _paq = window . _paq || [ ] ;
12+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
13+ _paq . push ( [ "setDocumentTitle" , document . domain + "/" + document . title ] ) ;
14+ _paq . push ( [ "setDomains" , [ "*.lessons.carpentries.org" , "*.datacarpentry.github.io" , "*.datacarpentry.org" , "*.librarycarpentry.github.io" , "*.librarycarpentry.org" , "*.swcarpentry.github.io" ] ] ) ;
15+ _paq . push ( [ "setDoNotTrack" , true ] ) ;
16+ _paq . push ( [ "disableCookies" ] ) ;
17+ _paq . push ( [ 'trackPageView' ] ) ;
18+ _paq . push ( [ 'enableLinkTracking' ] ) ;
19+ ( function ( ) {
20+ var u = "https://carpentries.matomo.cloud/" ;
21+ _paq . push ( [ 'setTrackerUrl' , u + 'matomo.php' ] ) ;
22+ _paq . push ( [ 'setSiteId' , '1' ] ) ;
23+ var d = document , g = d . createElement ( 'script' ) , s = d . getElementsByTagName ( 'script' ) [ 0 ] ;
24+ g . async = true ; g . src = '//cdn.matomo.cloud/carpentries.matomo.cloud/matomo.js' ; s . parentNode . insertBefore ( g , s ) ;
25+ } ) ( ) ;
26+ </ script >
27+ <!-- End Matomo Code -->
28+ {% endif %}
29+
30+ {% if page.math %}
31+ < script src ="{{ relative_root_path }}/assets/js/katex.min.js "> </ script >
32+ < script >
33+ options = {
34+ delimiters : [
35+ { left : "$$" , right : "$$" , display : true } ,
36+ { left : "$" , right : "$" , display : false } ,
37+ { left : "\\(" , right : "\\)" , display : false } ,
38+ { left : "\\[" , right : "\\]" , display : true }
39+ ] ,
40+ output : "mathml"
41+ }
42+ </ script >
43+ < script src ="{{ relative_root_path }}/assets/js/katex-auto-render.min.js " onload ="renderMathInElement(document.body, options) "> </ script >
44+ {% endif %}
45+
46+ {%- comment -%}
47+ AnchorJS: A JavaScript utility for adding deep anchor links
48+ https://github.com/bryanbraun/anchorjs
49+ https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js
50+ {%- endcomment -%}
51+
52+ < script src ="{{ relative_root_path }}/assets/js/anchor.min.js "> </ script >
53+ < script >
54+ anchors . add ( ) ;
55+ </ script >
0 commit comments