From 52460f376f79cd4640b8ed8a1343acaf02bf90aa Mon Sep 17 00:00:00 2001
From: FishCat233 <50800434+FishCat233@users.noreply.github.com>
Date: Thu, 16 Oct 2025 16:10:25 +0000
Subject: [PATCH] fix: modified time data of frontmatter didnt loaded. (#2165)
---
quartz/plugins/emitters/componentResources.ts | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts
index 857f4d3..f97fdde 100644
--- a/quartz/plugins/emitters/componentResources.ts
+++ b/quartz/plugins/emitters/componentResources.ts
@@ -228,6 +228,19 @@
\`
document.head.appendChild(matomoScript);
`)
+ } else if (cfg.analytics?.provider === "vercel") {
+ /**
+ * script from {@link https://vercel.com/docs/analytics/quickstart?framework=html#add-the-script-tag-to-your-site|Vercel Docs}
+ */
+ componentResources.beforeDOMLoaded.push(`
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
+ `)
+ componentResources.afterDOMLoaded.push(`
+ const vercelInsightsScript = document.createElement("script")
+ vercelInsightsScript.src = "/_vercel/insights/script.js"
+ vercelInsightsScript.defer = true
+ document.head.appendChild(vercelInsightsScript)
+ `)
}
if (cfg.enableSPA) {
--
Gitblit v1.10.0