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.
This commit is contained in:
parent
b3d6f78dd4
commit
25053653e4
@ -23,3 +23,7 @@
|
|||||||
{{ if hugo.IsProduction }}
|
{{ if hugo.IsProduction }}
|
||||||
{{ template "_internal/google_analytics.html" . }}
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.umami.enable }}
|
||||||
|
{{ partial "umami.html" . }}
|
||||||
|
{{ end }}
|
@ -12,8 +12,8 @@
|
|||||||
{{ with site.Params.menu }}
|
{{ with site.Params.menu }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<p class="small {{ if eq .url $currentPage.Path }} bold {{end}}">
|
<p class="small {{ if eq .url $currentPage.Path }} bold {{end}}">
|
||||||
<a href="{{.url}}">
|
<a href="{{ .url }}" {{ if and (isset . "newTab") .newTab }}target="_blank" rel="noopener noreferrer"{{ end }}>
|
||||||
/{{.name }}
|
/{{ .name }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -22,4 +22,4 @@
|
|||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
6
layouts/partials/umami.html
Normal file
6
layouts/partials/umami.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<script
|
||||||
|
async
|
||||||
|
defer
|
||||||
|
data-website-id="{{ .Site.Params.umami.websiteId }}"
|
||||||
|
src="{{ .Site.Params.umami.jsLocation }}"
|
||||||
|
></script>
|
Loading…
Reference in New Issue
Block a user