mirror of
https://github.com/tomfran/typo.git
synced 2025-04-25 21:19:55 +03:00
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
33198a8dd0
commit
095bd354c4
3 changed files with 13 additions and 3 deletions
|
@ -23,3 +23,7 @@
|
|||
{{ if hugo.IsProduction }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.umami.enable }}
|
||||
{{ partial "umami.html" . }}
|
||||
{{ end }}
|
|
@ -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>
|
||||
</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…
Add table
Add a link
Reference in a new issue