mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
chore(lint): fix lint issues
This commit is contained in:
parent
06b414cdf8
commit
989d42c741
@ -105,7 +105,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.head.appendChild(gtagScript);
|
document.head.appendChild(gtagScript);
|
||||||
`);
|
`)
|
||||||
} else if (cfg.analytics?.provider === "plausible") {
|
} else if (cfg.analytics?.provider === "plausible") {
|
||||||
const plausibleHost = cfg.analytics.host ?? "https://plausible.io"
|
const plausibleHost = cfg.analytics.host ?? "https://plausible.io"
|
||||||
componentResources.afterDOMLoaded.push(`
|
componentResources.afterDOMLoaded.push(`
|
||||||
@ -122,7 +122,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.head.appendChild(plausibleScript);
|
document.head.appendChild(plausibleScript);
|
||||||
`);
|
`)
|
||||||
} else if (cfg.analytics?.provider === "umami") {
|
} else if (cfg.analytics?.provider === "umami") {
|
||||||
componentResources.afterDOMLoaded.push(`
|
componentResources.afterDOMLoaded.push(`
|
||||||
const umamiScript = document.createElement("script");
|
const umamiScript = document.createElement("script");
|
||||||
@ -138,15 +138,15 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.head.appendChild(umamiScript);
|
document.head.appendChild(umamiScript);
|
||||||
`);
|
`)
|
||||||
} else if (cfg.analytics?.provider === "goatcounter") {
|
} else if (cfg.analytics?.provider === "goatcounter") {
|
||||||
componentResources.afterDOMLoaded.push(`
|
componentResources.afterDOMLoaded.push(`
|
||||||
const goatcounterScript = document.createElement('script');
|
const goatcounterScript = document.createElement('script');
|
||||||
goatcounterScript.src = "${cfg.analytics.scriptSrc ?? 'https://gc.zgo.at/count.js'}";
|
goatcounterScript.src = "${cfg.analytics.scriptSrc ?? "https://gc.zgo.at/count.js"}";
|
||||||
goatcounterScript.defer = true;
|
goatcounterScript.defer = true;
|
||||||
goatcounterScript.setAttribute(
|
goatcounterScript.setAttribute(
|
||||||
'data-goatcounter',
|
'data-goatcounter',
|
||||||
"https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? 'goatcounter.com'}/count"
|
"https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? "goatcounter.com"}/count"
|
||||||
);
|
);
|
||||||
goatcounterScript.onload = () => {
|
goatcounterScript.onload = () => {
|
||||||
window.goatcounter = { no_onload: true };
|
window.goatcounter = { no_onload: true };
|
||||||
@ -157,7 +157,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.head.appendChild(goatcounterScript);
|
document.head.appendChild(goatcounterScript);
|
||||||
`);
|
`)
|
||||||
} else if (cfg.analytics?.provider === "posthog") {
|
} else if (cfg.analytics?.provider === "posthog") {
|
||||||
componentResources.afterDOMLoaded.push(`
|
componentResources.afterDOMLoaded.push(`
|
||||||
const posthogScript = document.createElement("script");
|
const posthogScript = document.createElement("script");
|
||||||
@ -175,7 +175,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.head.appendChild(posthogScript);
|
document.head.appendChild(posthogScript);
|
||||||
`);
|
`)
|
||||||
} else if (cfg.analytics?.provider === "tinylytics") {
|
} else if (cfg.analytics?.provider === "tinylytics") {
|
||||||
const siteId = cfg.analytics.siteId
|
const siteId = cfg.analytics.siteId
|
||||||
componentResources.afterDOMLoaded.push(`
|
componentResources.afterDOMLoaded.push(`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user