| README.md | ●●●●● patch | view | raw | blame | history | |
| exampleSite/config.toml | ●●●●● patch | view | raw | blame | history | |
| layouts/_default/baseof.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/analytics/simpleanalytics.html | ●●●●● patch | view | raw | blame | history |
README.md
@@ -18,6 +18,7 @@ - Multilingual - 100⁄100 Google Lighthouse score - Google Analytics (optional) - SimpleAnalytics (optional) - Comments powered by Disqus (optional) - Katex support (optional) - Formspree Contact Form (optional) @@ -209,6 +210,16 @@ googleAnalytics = "UA-123-45" ``` ### Simple Analytics To use Simple Analytics, it has to be enabled by setting the parameter to true. If you are using a custom subdomain to evade Adblockers, then specify the URL without a trailing slash. ```toml [params.simpleAnalytics] enable = true # customurl = "https://analytics.example.com" ``` ### Google Site Verification To use Google Site Verification, add the following line to the `[params]`: exampleSite/config.toml
@@ -38,6 +38,10 @@ # Google Site Verify #googleSiteVerify = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" [params.simpleAnalytics] # enable = true # customurl = "https://analytics.example.com" ## Math settings [params.math] enable = false # options: true, false. Enable math support globally, default: false. You can always enable math on per page. layouts/_default/baseof.html
@@ -14,6 +14,9 @@ </div> {{- partial "footer.html" . -}} {{- if (eq .Site.Params.simpleAnalytics.enable true) -}} {{- partial "analytics/simpleanalytics.html" . -}} {{- end -}} </body> </html> layouts/partials/analytics/simpleanalytics.html
New file @@ -0,0 +1,7 @@ {{ with .Site.Params.simpleAnalytics.customUrl }} <script async defer src="{{ . | relURL }}/latest.js"></script> <noscript><img src="{{ . | relURL }}/noscript.gif" alt=""/></noscript> {{ else }} <script async defer src=" https://scripts.simpleanalyticscdn.com/latest.js"></script> <noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt=""/></noscript> {{ end }}