Enable local or remote Bootstrap and KaTeX files
parent
6197d90116
commit
2dd574f2d8
@ -1,37 +1,11 @@
|
|||||||
<link href="{{ relLangURL `apple-touch-icon.png` }}" rel="apple-touch-icon" sizes="180x180">
|
{{ $href := .href }}
|
||||||
<link href="{{ relLangURL `favicon-16x16.png` }}" rel="icon" sizes="16x16" type="image/png">
|
{{ $path := false }}
|
||||||
<link href="{{ relLangURL `favicon-32x32.png` }}" rel="icon" sizes="32x32" type="image/png">
|
{{ if eq $href (urls.Parse $href).Path }}
|
||||||
{{ if ne (relLangURL "favicon.ico") "/favicon.ico" }}
|
{{ $path = true }}
|
||||||
<link href="{{ relLangURL `favicon.ico` }}" rel="shortcut icon">
|
{{ with resources.Get (relLangURL $href) }}
|
||||||
{{ end }}
|
{{ $href = (. | minify | fingerprint).RelPermalink }}
|
||||||
<link href="{{ relLangURL `favicon.png` }}" rel="icon" type="image/png">
|
|
||||||
<link href="{{ relLangURL `favicon.svg` }}" rel="icon" type="image/svg+xml">
|
|
||||||
<link color="{{ .Site.Params.paige.color | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` }}" rel="mask-icon">
|
|
||||||
<link href="{{ relLangURL `site.webmanifest` }}" rel="manifest">
|
|
||||||
{{ with .Site.Params.paige.bootstrap.styles_path }}
|
|
||||||
{{ with resources.Get (relLangURL .) }}
|
|
||||||
<link href="{{ (. | minify | fingerprint).RelPermalink }}" rel="stylesheet">
|
|
||||||
{{ else }}
|
|
||||||
<link href="{{ relLangURL . }}" rel="stylesheet">
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" rel="stylesheet">
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.bootstrap.icons_path }}
|
|
||||||
{{ with resources.Get (relLangURL .) }}
|
|
||||||
<link href="{{ (. | minify | fingerprint).RelPermalink }}" rel="stylesheet">
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<link href="{{ relLangURL . }}" rel="stylesheet">
|
{{ $href = relLangURL $href }}
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" rel="stylesheet">
|
|
||||||
{{ end }}
|
|
||||||
{{ if or .Params.paige.math (and .Params.paige.show_full_pages (where .Pages "Params.paige.math" "eq" true)) }}
|
|
||||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
|
|
||||||
{{ end }}
|
|
||||||
{{ if .AlternativeOutputFormats }}
|
|
||||||
{{ $title := partial "paige/func-title" . }}
|
|
||||||
{{ range .AlternativeOutputFormats }}
|
|
||||||
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<link{{ if not $path }} crossorigin="anonymous"{{ end }} href="{{ $href }}" integrity="{{ .integrity }}" rel="stylesheet">
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<link href="{{ relLangURL `apple-touch-icon.png` }}" rel="apple-touch-icon" sizes="180x180">
|
||||||
|
<link href="{{ relLangURL `favicon-16x16.png` }}" rel="icon" sizes="16x16" type="image/png">
|
||||||
|
<link href="{{ relLangURL `favicon-32x32.png` }}" rel="icon" sizes="32x32" type="image/png">
|
||||||
|
{{ if ne (relLangURL "favicon.ico") "/favicon.ico" }}
|
||||||
|
<link href="{{ relLangURL `favicon.ico` }}" rel="shortcut icon">
|
||||||
|
{{ end }}
|
||||||
|
<link href="{{ relLangURL `favicon.png` }}" rel="icon" type="image/png">
|
||||||
|
<link href="{{ relLangURL `favicon.svg` }}" rel="icon" type="image/svg+xml">
|
||||||
|
<link color="{{ .Site.Params.paige.color | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` }}" rel="mask-icon">
|
||||||
|
<link href="{{ relLangURL `site.webmanifest` }}" rel="manifest">
|
||||||
|
{{ partial "paige/link" (dict
|
||||||
|
"href" (.Site.Params.paige.bootstrap.styles.link_href | default "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css")
|
||||||
|
"integrity" (.Site.Params.paige.bootstrap.styles.link_integrity | default "sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi")
|
||||||
|
) }}
|
||||||
|
{{ partial "paige/link" (dict
|
||||||
|
"href" (.Site.Params.paige.bootstrap.icons.link_href | default "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css")
|
||||||
|
"integrity" (.Site.Params.paige.bootstrap.icons.link_integrity | default "sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e")
|
||||||
|
) }}
|
||||||
|
{{ if or .Params.paige.math (and .Params.paige.show_full_pages (where .Pages "Params.paige.math" "eq" true)) }}
|
||||||
|
{{ partial "paige/link" (dict
|
||||||
|
"href" (.Site.Params.paige.math.styles.link_href | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css")
|
||||||
|
"integrity" (.Site.Params.paige.math.styles.link_integrity | default "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/")
|
||||||
|
) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .AlternativeOutputFormats }}
|
||||||
|
{{ $title := partial "paige/func-title" . }}
|
||||||
|
{{ range .AlternativeOutputFormats }}
|
||||||
|
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
@ -1,148 +1,11 @@
|
|||||||
<script>
|
{{ $path := false }}
|
||||||
function paigeResize() {
|
{{ $src := .src }}
|
||||||
var s = document.querySelector('section[class="paige-content"]');
|
{{ if eq $src (urls.Parse $src).Path }}
|
||||||
var mw = getComputedStyle(s).maxWidth;
|
{{ $path = true }}
|
||||||
var w;
|
{{ with resources.Get (relLangURL $src) }}
|
||||||
if (mw === "none") {
|
{{ $src = (. | minify | fingerprint).RelPermalink }}
|
||||||
var e = document.querySelector("body > div.container");
|
|
||||||
var s = getComputedStyle(e);
|
|
||||||
var px = parseFloat(s.paddingLeft) + parseFloat(s.paddingRight);
|
|
||||||
var bx = parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth);
|
|
||||||
w = e.offsetWidth - px - bx;
|
|
||||||
} else {
|
|
||||||
w = parseFloat(mw.substring(0, mw.length - 2));
|
|
||||||
}
|
|
||||||
var es = document.querySelectorAll('section[class="paige-content"] > div:not([class="footnotes"], [class="highlight"])');
|
|
||||||
for (var i = 0; i < es.length; i++) {
|
|
||||||
var e = es[i];
|
|
||||||
if (e.offsetWidth !== w) {
|
|
||||||
e.style.width = w + "px";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
paigeResize();
|
|
||||||
addEventListener("resize", paigeResize);
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ with .Site.Params.paige.bootstrap.scripts_path }}
|
|
||||||
{{ with resources.Get (relLangURL .) }}
|
|
||||||
<script defer src="{{ (. | minify | fingerprint).RelPermalink }}"></script>
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<script defer src="{{ relLangURL . }}"></script>
|
{{ $src = relLangURL $src }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
|
||||||
<script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
||||||
{{ end }}
|
|
||||||
{{ if or .Params.paige.math (and .Params.paige.show_full_pages (where .Pages "Params.paige.math" "eq" true)) }}
|
|
||||||
<script crossorigin="anonymous" defer integrity="sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js"></script>
|
|
||||||
<script crossorigin="anonymous" defer integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" onload="renderMathInElement(document.body);" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js"></script>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Site.GoogleAnalytics }}
|
|
||||||
{{ template "_internal/google_analytics.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.chartbeat }}
|
|
||||||
<script type='text/javascript'>
|
|
||||||
(function() {
|
|
||||||
var _sf_async_config = window._sf_async_config = (window._sf_async_config || {});
|
|
||||||
_sf_async_config.uid = {{ .account_id }};
|
|
||||||
_sf_async_config.domain = {{ .domain }};
|
|
||||||
_sf_async_config.useCanonical = true;
|
|
||||||
_sf_async_config.useCanonicalDomain = true;
|
|
||||||
function loadChartbeat() {
|
|
||||||
var e = document.createElement('script');
|
|
||||||
var n = document.getElementsByTagName('script')[0];
|
|
||||||
e.type = 'text/javascript';
|
|
||||||
e.async = true;
|
|
||||||
e.src = 'https://static.chartbeat.com/js/chartbeat.js';
|
|
||||||
n.parentNode.insertBefore(e, n);
|
|
||||||
}
|
|
||||||
loadChartbeat();
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.clicky }}
|
|
||||||
<script type="text/javascript">
|
|
||||||
var clicky_site_ids = clicky_site_ids || [];
|
|
||||||
clicky_site_ids.push({{ .account_id }});
|
|
||||||
(function() {
|
|
||||||
var s = document.createElement('script');
|
|
||||||
s.type = 'text/javascript';
|
|
||||||
s.async = true;
|
|
||||||
s.src = 'https://static.getclicky.com/js';
|
|
||||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.fathom }}
|
|
||||||
<script data-site="{{ .account_id }}" defer src="https://cdn.usefathom.com/script.js"></script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.finteza }}
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function(a,e,f,g,b,c,d){a[b]||(a.FintezaCoreObject=b,a[b]=a[b]||function(){(a[b].q=a[b].q||[]).push(arguments)},a[b].l=1*new Date,c=e.createElement(f),d=e.getElementsByTagName(f)[0],c.async=!0,c.defer=!0,c.src=g,d&&d.parentNode&&d.parentNode.insertBefore(c,d))})(window,document,"script","{{ .script_url }}","fz");
|
|
||||||
fz("register","website","{{ .account_id }}");
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.hotjar }}
|
|
||||||
<script type="application/javascript">
|
|
||||||
(function(h,o,t,j,a,r){
|
|
||||||
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
||||||
h._hjSettings={hjid:{{ .account_id }},hjsv:6};
|
|
||||||
a=o.getElementsByTagName('head')[0];
|
|
||||||
r=o.createElement('script');r.async=1;
|
|
||||||
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
|
||||||
a.appendChild(r);
|
|
||||||
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.matomo }}
|
|
||||||
<script type="text/javascript">
|
|
||||||
var _paq = window._paq = window._paq || [];
|
|
||||||
_paq.push(['trackPageView']);
|
|
||||||
_paq.push(['enableLinkTracking']);
|
|
||||||
(function() {
|
|
||||||
var u="https://{{ .host_url }}/";
|
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
|
||||||
_paq.push(['setSiteId', '{{ .account_id }}']);
|
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
|
||||||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.mixpanel }}
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function(f,b){if(!b.__SV){var e,g,i,h;window.mixpanel=b;b._i=[];b.init=function(e,f,c){function g(a,d){var b=d.split(".");2==b.length&&(a=a[b[0]],d=b[1]);a[d]=function(){a.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var a=b;"undefined"!==typeof c?a=b[c]=[]:c="mixpanel";a.people=a.people||[];a.toString=function(a){var d="mixpanel";"mixpanel"!==c&&(d+="."+c);a||(d+=" (stub)");return d};a.people.toString=function(){return a.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" ");
|
|
||||||
for(h=0;h<i.length;h++)g(a,i[h]);var j="set set_once union unset remove delete".split(" ");a.get_group=function(){function b(c){d[c]=function(){call2_args=arguments;call2=[c].concat(Array.prototype.slice.call(call2_args,0));a.push([e,call2])}}for(var d={},e=["get_group"].concat(Array.prototype.slice.call(arguments,0)),c=0;c<j.length;c++)b(j[c]);return d};b._i.push([e,f,c])};b.__SV=1.2;e=f.createElement("script");e.type="text/javascript";e.async=!0;e.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?
|
|
||||||
MIXPANEL_CUSTOM_LIB_URL:"file:"===f.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";g=f.getElementsByTagName("script")[0];g.parentNode.insertBefore(e,g)}})(document,window.mixpanel||[]);
|
|
||||||
mixpanel.init({{ .token }}, {});
|
|
||||||
mixpanel.track('page view');
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.plausible }}
|
|
||||||
<script data-domain="{{ .account_id }}" defer src="https://plausible.io/js/script.js"></script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.woopra }}
|
|
||||||
<script>
|
|
||||||
!function(){var t,o,c,e=window,n=document,r=arguments,a="script",i=["call","cancelAction","config","identify","push","track","trackClick","trackForm","update","visit"],s=function(){var t,o=this,c=function(t){o[t]=function(){return o._e.push([t].concat(Array.prototype.slice.call(arguments,0))),o}};for(o._e=[],t=0;t<i.length;t++)c(i[t])};for(e.__woo=e.__woo||{},t=0;t<r.length;t++)e.__woo[r[t]]=e[r[t]]=e[r[t]]||new s;(o=n.createElement(a)).async=1,o.src="https://static.woopra.com/w.js",(c=n.getElementsByTagName(a)[0]).parentNode.insertBefore(o,c)}("woopra");
|
|
||||||
woopra.config({
|
|
||||||
domain: {{ .domain }}
|
|
||||||
});
|
|
||||||
woopra.track();
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.paige.analytics.yandex }}
|
|
||||||
<script>
|
|
||||||
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
|
||||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
|
||||||
ym("{{ .account_id }}", "init", {});
|
|
||||||
</script>
|
|
||||||
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<script{{ if not $path }} crossorigin="anonymous"{{ end }} defer integrity="{{ .integrity }}"{{ with .onload }} onload="{{ . | safeJS }}"{{ end }} referrerpolicy="no-referrer" src="{{ $src }}"></script>
|
||||||
|
@ -0,0 +1,150 @@
|
|||||||
|
<script>
|
||||||
|
function paigeResize() {
|
||||||
|
var s = document.querySelector('section[class="paige-content"]');
|
||||||
|
var mw = getComputedStyle(s).maxWidth;
|
||||||
|
var w;
|
||||||
|
if (mw === "none") {
|
||||||
|
var e = document.querySelector("body > div.container");
|
||||||
|
var s = getComputedStyle(e);
|
||||||
|
var px = parseFloat(s.paddingLeft) + parseFloat(s.paddingRight);
|
||||||
|
var bx = parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth);
|
||||||
|
w = e.offsetWidth - px - bx;
|
||||||
|
} else {
|
||||||
|
w = parseFloat(mw.substring(0, mw.length - 2));
|
||||||
|
}
|
||||||
|
var es = document.querySelectorAll('section[class="paige-content"] > div:not([class="footnotes"], [class="highlight"])');
|
||||||
|
for (var i = 0; i < es.length; i++) {
|
||||||
|
var e = es[i];
|
||||||
|
if (e.offsetWidth !== w) {
|
||||||
|
e.style.width = w + "px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
paigeResize();
|
||||||
|
addEventListener("resize", paigeResize);
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ partial "paige/script" (dict
|
||||||
|
"integrity" (.Site.Params.paige.bootstrap.scripts.script_integrity | default "sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3")
|
||||||
|
"src" (.Site.Params.paige.bootstrap.scripts.script_src | default "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js")
|
||||||
|
) }}
|
||||||
|
{{ if or .Params.paige.math (and .Params.paige.show_full_pages (where .Pages "Params.paige.math" "eq" true)) }}
|
||||||
|
{{ partial "paige/script" (dict
|
||||||
|
"integrity" (.Site.Params.paige.math.scripts.script_integrity | default "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O")
|
||||||
|
"src" (.Site.Params.paige.math.scripts.script_src | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js")
|
||||||
|
) }}
|
||||||
|
{{ partial "paige/script" (dict
|
||||||
|
"integrity" (.Site.Params.paige.math.autorender.script_integrity | default "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05")
|
||||||
|
"onload" "renderMathInElement(document.body);"
|
||||||
|
"src" (.Site.Params.paige.math.autorender.script_src | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js")
|
||||||
|
) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.GoogleAnalytics }}
|
||||||
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.chartbeat }}
|
||||||
|
<script type='text/javascript'>
|
||||||
|
(function() {
|
||||||
|
var _sf_async_config = window._sf_async_config = (window._sf_async_config || {});
|
||||||
|
_sf_async_config.uid = {{ .account_id }};
|
||||||
|
_sf_async_config.domain = {{ .domain }};
|
||||||
|
_sf_async_config.useCanonical = true;
|
||||||
|
_sf_async_config.useCanonicalDomain = true;
|
||||||
|
function loadChartbeat() {
|
||||||
|
var e = document.createElement('script');
|
||||||
|
var n = document.getElementsByTagName('script')[0];
|
||||||
|
e.type = 'text/javascript';
|
||||||
|
e.async = true;
|
||||||
|
e.src = 'https://static.chartbeat.com/js/chartbeat.js';
|
||||||
|
n.parentNode.insertBefore(e, n);
|
||||||
|
}
|
||||||
|
loadChartbeat();
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.clicky }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
var clicky_site_ids = clicky_site_ids || [];
|
||||||
|
clicky_site_ids.push({{ .account_id }});
|
||||||
|
(function() {
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
s.async = true;
|
||||||
|
s.src = 'https://static.getclicky.com/js';
|
||||||
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.fathom }}
|
||||||
|
<script data-site="{{ .account_id }}" defer src="https://cdn.usefathom.com/script.js"></script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.finteza }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function(a,e,f,g,b,c,d){a[b]||(a.FintezaCoreObject=b,a[b]=a[b]||function(){(a[b].q=a[b].q||[]).push(arguments)},a[b].l=1*new Date,c=e.createElement(f),d=e.getElementsByTagName(f)[0],c.async=!0,c.defer=!0,c.src=g,d&&d.parentNode&&d.parentNode.insertBefore(c,d))})(window,document,"script","{{ .script_url }}","fz");
|
||||||
|
fz("register","website","{{ .account_id }}");
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.hotjar }}
|
||||||
|
<script type="application/javascript">
|
||||||
|
(function(h,o,t,j,a,r){
|
||||||
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
||||||
|
h._hjSettings={hjid:{{ .account_id }},hjsv:6};
|
||||||
|
a=o.getElementsByTagName('head')[0];
|
||||||
|
r=o.createElement('script');r.async=1;
|
||||||
|
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
||||||
|
a.appendChild(r);
|
||||||
|
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.matomo }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="https://{{ .host_url }}/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '{{ .account_id }}']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.mixpanel }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function(f,b){if(!b.__SV){var e,g,i,h;window.mixpanel=b;b._i=[];b.init=function(e,f,c){function g(a,d){var b=d.split(".");2==b.length&&(a=a[b[0]],d=b[1]);a[d]=function(){a.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var a=b;"undefined"!==typeof c?a=b[c]=[]:c="mixpanel";a.people=a.people||[];a.toString=function(a){var d="mixpanel";"mixpanel"!==c&&(d+="."+c);a||(d+=" (stub)");return d};a.people.toString=function(){return a.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" ");
|
||||||
|
for(h=0;h<i.length;h++)g(a,i[h]);var j="set set_once union unset remove delete".split(" ");a.get_group=function(){function b(c){d[c]=function(){call2_args=arguments;call2=[c].concat(Array.prototype.slice.call(call2_args,0));a.push([e,call2])}}for(var d={},e=["get_group"].concat(Array.prototype.slice.call(arguments,0)),c=0;c<j.length;c++)b(j[c]);return d};b._i.push([e,f,c])};b.__SV=1.2;e=f.createElement("script");e.type="text/javascript";e.async=!0;e.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?
|
||||||
|
MIXPANEL_CUSTOM_LIB_URL:"file:"===f.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";g=f.getElementsByTagName("script")[0];g.parentNode.insertBefore(e,g)}})(document,window.mixpanel||[]);
|
||||||
|
mixpanel.init({{ .token }}, {});
|
||||||
|
mixpanel.track('page view');
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.plausible }}
|
||||||
|
<script data-domain="{{ .account_id }}" defer src="https://plausible.io/js/script.js"></script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.woopra }}
|
||||||
|
<script>
|
||||||
|
!function(){var t,o,c,e=window,n=document,r=arguments,a="script",i=["call","cancelAction","config","identify","push","track","trackClick","trackForm","update","visit"],s=function(){var t,o=this,c=function(t){o[t]=function(){return o._e.push([t].concat(Array.prototype.slice.call(arguments,0))),o}};for(o._e=[],t=0;t<i.length;t++)c(i[t])};for(e.__woo=e.__woo||{},t=0;t<r.length;t++)e.__woo[r[t]]=e[r[t]]=e[r[t]]||new s;(o=n.createElement(a)).async=1,o.src="https://static.woopra.com/w.js",(c=n.getElementsByTagName(a)[0]).parentNode.insertBefore(o,c)}("woopra");
|
||||||
|
woopra.config({
|
||||||
|
domain: {{ .domain }}
|
||||||
|
});
|
||||||
|
woopra.track();
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.paige.analytics.yandex }}
|
||||||
|
<script>
|
||||||
|
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
||||||
|
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||||
|
ym("{{ .account_id }}", "init", {});
|
||||||
|
</script>
|
||||||
|
<noscript>{{ i18n "paige_noscript" }}</noscript>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue