mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
feat: support selfhost umami (#764)
* feat: support selfhsot umami * Update quartz/plugins/emitters/componentResources.ts Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * Update quartz/plugins/emitters/componentResources.ts Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
parent
6ce754bda2
commit
6ba138b4fa
2 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ export type Analytics =
|
|||
| {
|
||||
provider: "umami"
|
||||
websiteId: string
|
||||
host?: string
|
||||
}
|
||||
|
||||
export interface GlobalConfiguration {
|
||||
|
|
|
@ -119,7 +119,7 @@ function addGlobalPageResources(
|
|||
} else if (cfg.analytics?.provider === "umami") {
|
||||
componentResources.afterDOMLoaded.push(`
|
||||
const umamiScript = document.createElement("script")
|
||||
umamiScript.src = "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
|
||||
|
||||
|
|
Loading…
Reference in a new issue