Merge pull request #12 from jkfujr/main

Added a configurable option to open a new tab when clicking on the menu and support for Umami along with relevant configurable options.
This commit is contained in:
Francesco Tomaselli 2024-08-13 19:22:27 +02:00 committed by GitHub
commit aaca014377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View File

@ -27,3 +27,7 @@
{{ if hugo.IsProduction }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if .Site.Params.umami.enable }}
{{ partial "umami.html" . }}
{{ end }}

View File

@ -11,8 +11,9 @@
{{ with site.Params.menu }}
{{ range . }}
<p class="small {{ if eq .name (lower $currentPage.Name) }} bold {{end}}">
<a href="{{.url}}">
<a href="{{ .url }}" {{ if and (isset . "newTab") .newTab }}target="_blank" rel="noopener noreferrer"{{ end }}>
/{{.name }}
</a>
</p>
@ -22,4 +23,4 @@
{{ end }}
</div>
</div>

View File

@ -0,0 +1,6 @@
<script
async
defer
data-website-id="{{ .Site.Params.umami.websiteId }}"
src="{{ .Site.Params.umami.jsLocation }}"
></script>