Merge branch 'add-umami-support' into 'master'
Add umami analytics support See merge request gabmus/hugo-ficurinia!1
This commit is contained in:
commit
a570911957
|
@ -107,6 +107,10 @@ summaryLength = 70 # number of words for article summaries
|
|||
plausibleScriptUrl = "https://something.com/..."
|
||||
plausibleDomain = "example.com"
|
||||
|
||||
# enable analytics using Umami
|
||||
umamiScriptUrl = "https://something.com/..."
|
||||
umamiWebsiteId = "example-tracking-code"
|
||||
|
||||
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
|
||||
tocBeforeImage = false # show the table of contents before the main article image; default false
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{- partial "plausible.html" . -}}
|
||||
{{- partial "umami.html" . -}}
|
||||
{{- partial "inject/body.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{{ if .Site.Params.umamiScriptUrl }}
|
||||
{{ if .Site.Params.umamiWebsiteId }}
|
||||
<script
|
||||
async
|
||||
defer
|
||||
data-website-id="{{ .Site.Params.umamiWebsiteId }}"
|
||||
src="{{ .Site.Params.umamiScriptUrl }}"
|
||||
></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in New Issue