Post feedback (π / π)
Post feedback (π / π)
The site shows Was this post helpful? on every blog post. Votes are stored in the browser so each reader can only vote once per post.
Show totals for everyone (optional)
GitHub Pages is staticβthere is no serverβso aggregated counts need a tiny backend. This repo includes a Cloudflare Worker that stores counts in KV.
- Install Wrangler and log in.
- Create a KV namespace:
cd docs/workers npx wrangler kv namespace create POST_FEEDBACK - Copy
wrangler.toml.exampleβwrangler.tomland paste the KV id. - Deploy:
npx wrangler deploy - In
docs/_config.yml, set:post_feedback_worker_url: "https://ggundbits-post-feedback.<your-subdomain>.workers.dev" - Rebuild and publish the site.
CORS allows any origin by default; tighten Access-Control-Allow-Origin in the Worker if you want only https://ggundbits.com.
Turn off on one post
Front matter:
feedback: false