From efd46f84de2d8dcc630b96de5454027bfbbf5f6e Mon Sep 17 00:00:00 2001
From: Eiko Wagenknecht <git@eiko-wagenknecht.de>
Date: Mon, 19 Feb 2024 08:08:36 +0000
Subject: [PATCH] fix(frontmatter): delimiters parameter was not passed (#885)

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

diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts
index c3a60b2..0468416 100644
--- a/quartz/plugins/emitters/componentResources.ts
+++ b/quartz/plugins/emitters/componentResources.ts
@@ -120,7 +120,7 @@
   } else if (cfg.analytics?.provider === "umami") {
     componentResources.afterDOMLoaded.push(`
       const umamiScript = document.createElement("script")
-      umamiScript.src = ${cfg.analytics.host} ?? "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
 
@@ -196,10 +196,6 @@
       const cfg = ctx.cfg.configuration
       // component specific scripts and styles
       const componentResources = getComponentResources(ctx)
-      // important that this goes *after* component scripts
-      // as the "nav" event gets triggered here and we should make sure
-      // that everyone else had the chance to register a listener for it
-
       let googleFontsStyleSheet = ""
       if (fontOrigin === "local") {
         // let the user do it themselves in css
@@ -221,7 +217,10 @@
             // the static name of this file.
             const [filename, ext] = url.split("/").pop()!.split(".")
 
-            googleFontsStyleSheet = googleFontsStyleSheet.replace(url, `/fonts/${filename}.ttf`)
+            googleFontsStyleSheet = googleFontsStyleSheet.replace(
+              url,
+              `/static/fonts/${filename}.ttf`,
+            )
 
             promises.push(
               fetch(url)
@@ -234,7 +233,7 @@
                 .then((buf) =>
                   write({
                     ctx,
-                    slug: joinSegments("fonts", filename) as FullSlug,
+                    slug: joinSegments("static", "fonts", filename) as FullSlug,
                     ext: `.${ext}`,
                     content: Buffer.from(buf),
                   }),
@@ -244,12 +243,15 @@
         }
       }
 
+      // important that this goes *after* component scripts
+      // as the "nav" event gets triggered here and we should make sure
+      // that everyone else had the chance to register a listener for it
       addGlobalPageResources(ctx, resources, componentResources)
 
       const stylesheet = joinStyles(
         ctx.cfg.configuration.theme,
-        ...componentResources.css,
         googleFontsStyleSheet,
+        ...componentResources.css,
         styles,
       )
       const [prescript, postscript] = await Promise.all([

--
Gitblit v1.10.0