1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 17:56:26 +00:00

Try to add page feedback buttons

(this may not work!)
This commit is contained in:
David Young
2021-11-03 09:30:41 +13:00
committed by GitHub
parent b0a23ff850
commit 20fad049b2
4 changed files with 33 additions and 18 deletions

View File

@@ -230,21 +230,37 @@ extra:
- icon: 'material/mailbox'
link: 'mailto:davidy@funkypenguin.co.nz?Subject=Hello%2C%20from%20a%20geek-cookbook%20reader%20%3B%29'
generator: false
consent:
title: 'Would you like a cookie? 🍪'
description: >
# Plausible doesn't use cookies, so no need for this!
# consent:
# title: 'Would you like a cookie? 🍪'
# description: >
I know. cookies suck (<I>except the fresh, warm, choc-chip ones!</I>), and so does invasive tracking. Thing is, without cookies,
analytics can't record your visit, and I can't work out where/how to invest time to make the cookbook better.
# I know. cookies suck (<I>except the fresh, warm, choc-chip ones!</I>), and so does invasive tracking. Thing is, without cookies,
# analytics can't record your visit, and I can't work out where/how to invest time to make the cookbook better.
<p>So, with your consent, I'd like to record what you look at and where you're from, so that I can make the
cookbook even better. My analytics are public - here's <A HREF='https://plausible.io/geek-cookbook.funkypenguin.co.nz' target="_blank">all</A> I know about you! - David</p>
cookies:
custom: Plausible Analytics
# <p>So, with your consent, I'd like to record what you look at and where you're from, so that I can make the
# cookbook even better. My analytics are public - here's <A HREF='https://plausible.io/geek-cookbook.funkypenguin.co.nz' target="_blank">all</A> I know about you! - David</p>
# cookies:
# custom: Plausible Analytics
analytics:
provider: plausible
data_domain: geek-cookbook.funkypenguin.co.nz
feedback:
title: Was this page helpful?
ratings:
- icon: material/emoticon-happy-outline
name: This page was helpful
data: 1
note: >-
Thanks for your feedback!
- icon: material/emoticon-sad-outline
name: This page could be improved
data: 0
note: >-
Thanks for your feedback!
# Help us improve this page by
# using our <a href="..." target=_blank>feedback form</a>.
# extra_css:

View File

@@ -5,5 +5,5 @@ https://geeks-cookbook.funkypenguin.co.nz/* https://geek-cookbook.funkypenguin.c
https://geek-cookbook.funkypenguin.co.nz/recipies/* https://geek-cookbook.funkypenguin.co.nz/recipes/:splat 301!
# Proxy plausible analytics per https://plausible.io/docs/proxy/guides/netlify
/js/i-am-groot.js https://plausible.io/js/plausible.exclusions.outbound-links.js 200
/api/event https://plausible.io/api/event 202
/js/i-am-groot.js https://plausible.io/js/plausible.outbound-links.js 200
/api/event https://plausible.io/api/event 202

View File

@@ -20,10 +20,8 @@
</div>
{% endblock %}
{% block analytics %}
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>
</script>
<script defer data-domain="geek-cookbook.funkypenguin.co.nz" src="/js/i-am-groot.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer></script>
<script src="/js/i-am-groot.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
{% endblock %}

View File

@@ -1 +1,2 @@
<script defer data-domain="{{ data_domain }}" src="js/i-am-groot.js"></script>
<script src="js/i-am-groot.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>