Add Plausible analytics

This commit is contained in:
Oliver Davies 2021-06-30 08:00:00 +01:00
parent a91b413e4a
commit fa4a806b9c
4 changed files with 13 additions and 0 deletions

View file

@ -58,6 +58,9 @@ menus:
href: /talks href: /talks
is_active: '^/talks/?' is_active: '^/talks/?'
plausible:
domain: ~
twitter: twitter:
name: opdavies name: opdavies
url: 'https://twitter.com/%twitter.name%' url: 'https://twitter.com/%twitter.name%'

View file

@ -1,3 +1,6 @@
--- ---
imports: imports:
- sculpin_site.yml - sculpin_site.yml
plausible:
domain: 'oliverdavies.uk'

View file

@ -6,6 +6,10 @@
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,700;1,300&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,700;1,300&display=swap" rel="stylesheet">
{% include 'meta' with { page, site } only %} {% include 'meta' with { page, site } only %}
{% include 'plausible' with {
plausible: site.plausible,
} only %}
</head> </head>
<body> <body>
{% block body %}{% endblock %} {% block body %}{% endblock %}

View file

@ -0,0 +1,3 @@
{% if plausible.domain %}
<script defer data-domain="{{ plausible.domain }}" src="https://plausible.io/js/plausible.js"></script>
{% endif %}