| | |
| | | } 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 |
| | | |
| | |
| | | // 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) |
| | |
| | | .then((buf) => |
| | | write({ |
| | | ctx, |
| | | slug: joinSegments("fonts", filename) as FullSlug, |
| | | slug: joinSegments("static", "fonts", filename) as FullSlug, |
| | | ext: `.${ext}`, |
| | | content: Buffer.from(buf), |
| | | }), |