From 36512b6f92abde43ed6d9807ad63c61e27e7e654 Mon Sep 17 00:00:00 2001 From: Realmy <163438634+RealmyTheMan@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:27:49 +0100 Subject: [PATCH] Plausible analytics support --- example.env | 2 ++ src/routes/+layout.svelte | 6 ++++++ svelte.config.js | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 example.env diff --git a/example.env b/example.env new file mode 100644 index 0000000..d85771f --- /dev/null +++ b/example.env @@ -0,0 +1,2 @@ +PUB_HOSTNAME=vert.sh # only gets used for plausible (for now) +PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f5488ad..32ffd0b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -7,6 +7,7 @@ import Logo from "$lib/components/visual/svg/Logo.svelte"; import { fly } from "svelte/transition"; import featuredImage from "$lib/assets/VERT_Feature.webp"; + import { PUB_HOSTNAME, PUB_PLAUSIBLE_URL } from "$env/static/public"; let { children, data } = $props(); let navWidth = $state(1); @@ -40,6 +41,11 @@ + {#if PUB_PLAUSIBLE_URL}{/if}