From 921f45cf7001a6af77cd0bf10f7fbf154eebabff Mon Sep 17 00:00:00 2001
From: threehymns <70611435+threehymns@users.noreply.github.com>
Date: Wed, 25 Sep 2024 00:20:36 +0000
Subject: [PATCH] feat: add a config option for a pageTitleSuffix (#1320)
---
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 e6725d9..d36b51c 100644
--- a/quartz/plugins/emitters/componentResources.ts
+++ b/quartz/plugins/emitters/componentResources.ts
@@ -144,6 +144,14 @@
tinylyticsScript.defer = true
document.head.appendChild(tinylyticsScript)
`)
+ } else if (cfg.analytics?.provider === "cabin") {
+ componentResources.afterDOMLoaded.push(`
+ const cabinScript = document.createElement("script")
+ cabinScript.src = "${cfg.analytics.host ?? "https://scripts.withcabin.com"}/hello.js"
+ cabinScript.defer = true
+ cabinScript.async = true
+ document.head.appendChild(cabinScript)
+ `)
}
if (cfg.enableSPA) {
--
Gitblit v1.10.0