diff options
| author | P家单推人 <jkfujr@qq.com> | 2024-07-29 08:38:28 +0800 | 
|---|---|---|
| committer | jkfujr <jkfujr@qq.com> | 2024-08-11 12:18:49 +0800 | 
| commit | fcb9e7b4601203c3d9a0ef455a3727502b3e3aa0 (patch) | |
| tree | 97ceaafbb61d8232f9f61e40ee8243030c1f3494 /layouts | |
| parent | 4704defdc8eee9bc5c9ed41c651f21bba2a4b631 (diff) | |
Update header.html and add support for Umami
- Updated header.html with necessary changes.
- Added support for Umami along with relevant configurable options.
- Included a new umami.html file for tracking.
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/head.html | 4 | ||||
| -rw-r--r-- | layouts/partials/header.html | 6 | ||||
| -rw-r--r-- | layouts/partials/umami.html | 6 | 
3 files changed, 13 insertions, 3 deletions
| diff --git a/layouts/partials/head.html b/layouts/partials/head.html index bf00a74..8f098d1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -23,3 +23,7 @@  {{ if hugo.IsProduction }}  {{ template "_internal/google_analytics.html" . }}  {{ end }} + +{{ if .Site.Params.umami.enable }} +  {{ partial "umami.html" . }} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 8933883..b96fd83 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,8 +12,8 @@          {{ with site.Params.menu }}          {{ range . }}          <p class="small {{ if eq .url $currentPage.Path }} bold {{end}}"> -            <a href="{{.url}}"> -                /{{.name }} +            <a href="{{ .url }}" {{ if and (isset . "newTab") .newTab }}target="_blank" rel="noopener noreferrer"{{ end }}> +                /{{ .name }}              </a>          </p>          {{ end }} @@ -22,4 +22,4 @@      {{ end }} -</div>
\ No newline at end of file +</div> diff --git a/layouts/partials/umami.html b/layouts/partials/umami.html new file mode 100644 index 0000000..1ef689b --- /dev/null +++ b/layouts/partials/umami.html @@ -0,0 +1,6 @@ +<script +  async +  defer +  data-website-id="{{ .Site.Params.umami.websiteId }}" +  src="{{ .Site.Params.umami.jsLocation }}" +></script> | 
