diff options
| author | Eltrac <hi@guhub.cn> | 2024-12-19 14:41:26 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2024-12-19 14:41:26 +0800 |
| commit | 103be55e7daec04b8da85ee175a9ec2317a167b0 (patch) | |
| tree | 99af7983332c60d0f276416a34d936a5581fede8 /layouts/partials/head/headscript.html | |
| parent | c695b9511ba695bc57144b8c3f72e08625cce29a (diff) | |
refactor: disable theme and move layout files to root
Diffstat (limited to 'layouts/partials/head/headscript.html')
| -rw-r--r-- | layouts/partials/head/headscript.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/head/headscript.html b/layouts/partials/head/headscript.html new file mode 100644 index 00000000..8ed6fd40 --- /dev/null +++ b/layouts/partials/head/headscript.html @@ -0,0 +1,24 @@ +<!-- Global JavaScript Variables --> +<script> + var waline_options = { + // basic configuration + el: '#waline', + serverURL: 'https://waline.geedea.pro', + dark: 'auto', + search: false, + // if localhost then disable pageview count + pageview: (location.href.includes('localhost')) ? false : true + }; +</script> + +<script> +/* === umami tracking === */ +if (window.location.hostname !== 'localhost') { + // track traffic + const script = document.createElement('script'); + script.defer = true; + script.src = 'https://cloud.umami.is/script.js'; + script.dataset.websiteId = 'ae8c2619-56eb-4577-ac31-9dc6ea44bda7'; + document.head.appendChild(script); +} +</script> |
