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