Skip to content

Commit

Permalink
Add support for plausible.io (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom committed Mar 2, 2023
1 parent 959421d commit d392a19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ disableHugoGeneratorInject = false
#
justifyContent = false # Set "text-align: justify" to .post-content.

# Integrate Plausible.io
# plausible = 'test.com'

# Custom footer
# If you want, you can easily override the default footer with your own content.
#
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@
{{- if .Site.GoogleAnalytics }}
{{ template "_internal/google_analytics.html" . }}
{{- end}}

<!-- Plausible.io -->
{{- if $.Site.Params.plausible }}
<script defer data-domain="{{ .Site.Params.plausible }}" src="https://plausible.io/js/script.js"></script>
{{- end}}

0 comments on commit d392a19

Please sign in to comment.