diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 153bbe2..a7f79e3 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -16,6 +16,7 @@ export type Analytics = | { provider: "umami" websiteId: string + host?: string } export interface GlobalConfiguration { diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index f92c0a9..accc261 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -119,7 +119,7 @@ function addGlobalPageResources( } else if (cfg.analytics?.provider === "umami") { componentResources.afterDOMLoaded.push(` const umamiScript = document.createElement("script") - umamiScript.src = "https://analytics.umami.is/script.js" + umamiScript.src = cfg.analytics.host ?? "https://analytics.umami.is/script.js" umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}") umamiScript.async = true