diff options
| author | Francesco Tomaselli <tomaselli.fr@gmail.com> | 2024-08-13 19:22:27 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-13 19:22:27 +0200 | 
| commit | 16d9ca1344b5945020cc28c20468ac3d92f12922 (patch) | |
| tree | 4dc1c531093c24ea9a6561d30a03879ae87126e0 /layouts/partials | |
| parent | fcbc8882f28293ab0e2048d432cab42778479244 (diff) | |
| parent | 7459828ba7abe921084dc88f8162be46197f7e77 (diff) | |
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.
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/head.html | 4 | ||||
| -rw-r--r-- | layouts/partials/header.html | 5 | ||||
| -rw-r--r-- | layouts/partials/umami.html | 6 | 
3 files changed, 13 insertions, 2 deletions
| diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 508b391..482d7e9 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -27,3 +27,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 446fb19..bd17f38 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -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>
\ 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> | 
