diff options
author | Leonardo Faria <leonardofaria@gmail.com> | 2020-08-26 08:14:47 +0300 |
---|---|---|
committer | Leonardo Faria <leonardofaria@gmail.com> | 2020-08-26 08:18:39 +0300 |
commit | 8bebb1653e121a7337d70e6189b78a31868514d6 (patch) | |
tree | b26edabafe826e0b07049bec2d58287568545cdf | |
parent | 1ee24540ae22226a4c345fca63acf805abe8c06b (diff) |
Add Umami support
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 13 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/umami.html | 1 |
4 files changed, 15 insertions, 5 deletions
@@ -12,7 +12,7 @@ A minimalist theme for Hugo, built with Tailwind CSS. - Responsive - Super-fast - [100% in Lighthouse tests](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fbento-hugo-theme.netlify.app%2F) - Tailwind CSS with PostCSS: super tiny CSS file -- Google Analytics, Fathom Analytics and Disqus integration +- Google Analytics, Fathom Analytics, Umami and Disqus integration - Syntax Highlighting with GitHub theme - Full content RSS - Turbolinks: no page refresh diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 790e269..337945c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -51,11 +51,16 @@ disqusShortname = "bento-hugo-theme" # Bio is shown in the end of posts authorBio = "Bento is a doggo who likes to code. Follow him on <a href='#'>Twitter</a>" -# If you want to use fathom(https://usefathom.com) for analytics, add this section +# If you want to use fathom (https://usefathom.com) for analytics, add this section [params.fathomAnalytics] - siteID = "XXXXX" - # Default value is cdn.usefathom.com, overwrite this if you are self-hosting - serverURL = "analytics.example.com" + siteID = "XXXXX" + # Default value is cdn.usefathom.com, overwrite this if you are self-hosting + serverURL = "analytics.example.com" + +# If you want to use umami (https://umami.is/) for analytics, add this section +[params.umami] + siteID = "XXXXX" + trackerScript = "//umami.example.com/umami.js" # Items in the top menu [menu] diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 54d6c8f..2628bce 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -75,4 +75,8 @@ {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} {{- partial "fathom" . -}} +{{ end }} + +{{ if and .Site.Params.umami }} + {{- partial "umami" . -}} {{ end }}
\ No newline at end of file diff --git a/layouts/partials/umami.html b/layouts/partials/umami.html new file mode 100644 index 0000000..67e3a41 --- /dev/null +++ b/layouts/partials/umami.html @@ -0,0 +1 @@ +<script async defer data-website-id="{{ .Site.Params.umami.siteID }}" src="{{ .Site.Params.umami.trackerScript }}"></script>
\ No newline at end of file |