diff --git a/README.md b/README.md index 0c84cf1..f9563bb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hugo Umami Module -[![Used By](https://flat.badgen.net/github/dependents-repo/hugomods/umami?icon=github&label=used+by&color=green)](https://github.com/hugomods/umami/network/dependents) -![Hugo Requirements](https://img.shields.io/badge/dynamic/json?color=important&label=requirements&query=requirements&logo=hugo&style=flat-square&url=https://api.razonyang.com/v1/hugo/modules/github.com/hugomods/umami) -[![License](https://flat.badgen.net/github/license/hugomods/umami)](https://github.com/hugomods/umami/blob/main/LICENSE) -[![Version](https://flat.badgen.net/github/tag/hugomods/umami)](https://github.com/hugomods/umami/tags) +[![Used By](https://flat.badgen.net/github/dependents-repo/hugomods/umami-analytics?icon=github&label=used+by&color=green)](https://github.com/hugomods/umami-analytics/network/dependents) +![Hugo Requirements](https://img.shields.io/badge/dynamic/json?color=important&label=requirements&query=requirements&logo=hugo&style=flat-square&url=https://api.razonyang.com/v1/hugo/modules/github.com/hugomods/umami-analytics) +[![License](https://flat.badgen.net/github/license/hugomods/umami-analytics)](https://github.com/hugomods/umami-analytics/blob/main/LICENSE) +[![Version](https://flat.badgen.net/github/tag/hugomods/umami-analytics)](https://github.com/hugomods/umami-analytics/tags) diff --git a/go.mod b/go.mod index c15109a..5582e4c 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/hugomods/umami +module github.com/hugomods/umami-analytics go 1.18 diff --git a/hugo.toml b/hugo.toml index ead16eb..3db05a9 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,6 +1,6 @@ -[params.hugopress.modules.umami.hooks.head-end] +[params.hugopress.modules.umami-analytics.hooks.head-end] cacheable = true cache_param_key = "analyze" -[params.services.umami] +[params.services.umami_analytics] script_url = "https://cloud.umami.is/script.js" diff --git a/layouts/partials/hugomods/umami/assets/js.html b/layouts/partials/hugomods/umami-analytics/assets/js.html similarity index 64% rename from layouts/partials/hugomods/umami/assets/js.html rename to layouts/partials/hugomods/umami-analytics/assets/js.html index 7b79271..f46719a 100644 --- a/layouts/partials/hugomods/umami/assets/js.html +++ b/layouts/partials/hugomods/umami-analytics/assets/js.html @@ -1,7 +1,7 @@ {{- with site.Params.services.umami.id }} {{- end }} diff --git a/layouts/partials/hugomods/umami-analytics/index.html b/layouts/partials/hugomods/umami-analytics/index.html new file mode 100644 index 0000000..236a464 --- /dev/null +++ b/layouts/partials/hugomods/umami-analytics/index.html @@ -0,0 +1,3 @@ +{{- if default true .Params.analyze }} + {{ partialCached "hugomods/umami-analytics/assets/js" . }} +{{- end }} diff --git a/layouts/partials/hugomods/umami/index.html b/layouts/partials/hugomods/umami/index.html deleted file mode 100644 index b3ed130..0000000 --- a/layouts/partials/hugomods/umami/index.html +++ /dev/null @@ -1,3 +0,0 @@ -{{- if default true .Params.analyze }} - {{ partialCached "hugomods/umami/assets/js" . }} -{{- end }} diff --git a/layouts/partials/hugopress/modules/umami-analytics/hooks/head-end.html b/layouts/partials/hugopress/modules/umami-analytics/hooks/head-end.html new file mode 100644 index 0000000..9406ed3 --- /dev/null +++ b/layouts/partials/hugopress/modules/umami-analytics/hooks/head-end.html @@ -0,0 +1 @@ +{{ partialCached "hugomods/umami-analytics/index" .Page .Page.Params.analyze }} diff --git a/layouts/partials/hugopress/modules/umami/hooks/head-end.html b/layouts/partials/hugopress/modules/umami/hooks/head-end.html deleted file mode 100644 index 2bfd95f..0000000 --- a/layouts/partials/hugopress/modules/umami/hooks/head-end.html +++ /dev/null @@ -1 +0,0 @@ -{{ partialCached "hugomods/umami/index" .Page .Page.Params.analyze }}