Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

Plausible analytics support

Realmy36512b6f92ab
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 @@
<meta name="theme-color" content="#F2ABEE" />
<meta property="og:image" content={featuredImage} />
<meta property="twitter:image" content={featuredImage} />
+ {#if PUB_PLAUSIBLE_URL}<script
+ defer
+ data-domain={PUB_HOSTNAME || "vert.sh"}
+ src="{PUB_PLAUSIBLE_URL}/js/script.js"
+ ></script>{/if}
</svelte:head>
<div
diff --git a/svelte.config.js b/svelte.config.js
index 62d7d91..2a86860 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -12,6 +12,10 @@ const config = {
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
+ env: {
+ publicPrefix: "PUB_",
+ privatePrefix: "PRI_",
+ },
},
};