From 438ea6d73b5449c6e6737f6f1f3a06a02e2659c3 Mon Sep 17 00:00:00 2001
From: zenodotus280 <16273022+zenodotus280@users.noreply.github.com>
Date: Mon, 13 May 2024 02:04:21 +0000
Subject: [PATCH] docs(showcase): add patternlanguage.cc (#1135)

---
 quartz/plugins/emitters/componentResources.ts |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts
index 81d3af2..e6725d9 100644
--- a/quartz/plugins/emitters/componentResources.ts
+++ b/quartz/plugins/emitters/componentResources.ts
@@ -136,6 +136,14 @@
       posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host ?? "https://app.posthog.com"}'})\`
       document.head.appendChild(posthogScript)
     `)
+  } else if (cfg.analytics?.provider === "tinylytics") {
+    const siteId = cfg.analytics.siteId
+    componentResources.afterDOMLoaded.push(`
+      const tinylyticsScript = document.createElement("script")
+      tinylyticsScript.src = "https://tinylytics.app/embed/${siteId}.js"
+      tinylyticsScript.defer = true
+      document.head.appendChild(tinylyticsScript)
+    `)
   }
 
   if (cfg.enableSPA) {

--
Gitblit v1.10.0