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:
commit
aaca014377
@ -27,3 +27,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 }}
|
@ -11,8 +11,9 @@
|
|||||||
|
|
||||||
{{ with site.Params.menu }}
|
{{ with site.Params.menu }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
|
|
||||||
<p class="small {{ if eq .name (lower $currentPage.Name) }} bold {{end}}">
|
<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 }}
|
/{{.name }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -22,4 +23,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