-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathindex.html
93 lines (86 loc) · 3.15 KB
/
index.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Netherlands eScience Center Guide</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/docsify/themes/vue.css"
/>
<link rel="stylesheet" href="/styles.css" />
<link rel="icon" type="image/png" href="images/favicon.png" />
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: "Netherlands eScience Center Guide",
repo: "NLeSC/guide",
loadSidebar: true,
logo: "/images/netherlands-escience-center-logo-RGB.png",
alias: {
"/.*/_sidebar.md": "/_sidebar.md",
},
relativePath: true,
matomo: {
host: "//matomo.research.software",
id: 5,
disableCookies: true,
},
};
</script>
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
<!-- custom version of Matomo plugin, modified from https://github.com/docsifyjs/docsify/blob/develop/src/plugins/matomo.js -->
<script>
function appendScript(options) {
const script = document.createElement("script");
script.async = true;
script.src = options.host + "/matomo.js";
document.body.appendChild(script);
}
function init(options) {
window._paq = window._paq || [];
if (options.disableCookies) {
window._paq.push(["disableCookies"]); // Call disableCookies before calling trackPageView
}
// window._paq.push(["trackPageView"]);
window._paq.push(["enableLinkTracking"]);
setTimeout(() => {
appendScript(options);
window._paq.push(["setTrackerUrl", options.host + "/matomo.php"]);
window._paq.push(["setSiteId", String(options.id)]);
}, 0);
}
function collect() {
if (!window._paq) {
init($docsify.matomo);
}
window._paq.push(["setCustomUrl", "/" + window.location.hash]);
window._paq.push(["setDocumentTitle", document.title]);
window._paq.push(["trackPageView"]);
}
const install = function (hook) {
if (!$docsify.matomo) {
// eslint-disable-next-line no-console
console.error("[Docsify] matomo is required.");
return;
}
hook.doneEach(collect);
};
// only load Matomo if there's no opt-out cookie:
if (document.cookie.indexOf("mtm_consent_removed=") == -1) {
window.$docsify = window.$docsify || {};
$docsify.plugins = [install, ...($docsify.plugins || [])];
}
</script>
</body>
</html>