From d16d5ea7c7a44fa0f41f4c1261c700f2271b4b51 Mon Sep 17 00:00:00 2001 From: razonyang Date: Sun, 13 Oct 2024 13:26:27 +0800 Subject: [PATCH] feat: rename umami to umami-analytics --- README.md | 8 ++++---- go.mod | 2 +- hugo.toml | 4 ++-- .../hugomods/{umami => umami-analytics}/assets/js.html | 2 +- layouts/partials/hugomods/umami-analytics/index.html | 3 +++ layouts/partials/hugomods/umami/index.html | 3 --- .../hugopress/modules/umami-analytics/hooks/head-end.html | 1 + .../partials/hugopress/modules/umami/hooks/head-end.html | 1 - 8 files changed, 12 insertions(+), 12 deletions(-) rename layouts/partials/hugomods/{umami => umami-analytics}/assets/js.html (64%) create mode 100644 layouts/partials/hugomods/umami-analytics/index.html delete mode 100644 layouts/partials/hugomods/umami/index.html create mode 100644 layouts/partials/hugopress/modules/umami-analytics/hooks/head-end.html delete mode 100644 layouts/partials/hugopress/modules/umami/hooks/head-end.html 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 }}