Cloudflare Workers for Tuam Records Project
This folder is not part of the Jekyll site. It holds two small Workers:
corrections-relay.js(config:wrangler.toml) – hidden corrections form relay.page-counter.js(config:page-counter.toml) – cookieless page-view counter shown in the site footer.
Corrections relay
Sits between the public correction form on contact.html and this
repository’s GitHub Issues. Visitors never see github.com.
One-time setup (only needs doing once)
- Create a free Cloudflare account at https://dash.cloudflare.com/sign-up.
- Install Wrangler (Cloudflare’s deploy tool):
npm install -g wrangler(requires Node.js, also free). - From this
cloudflare/folder, runwrangler loginonce, and follow the browser prompt to connect your Cloudflare account. - Create a GitHub fine-grained personal access token at
https://github.com/settings/personal-access-tokens/new: repository
access limited to
tuam-records-projectonly, permissions set toIssues: Read and write, nothing else. - Run
wrangler deployfrom this folder. Note theworkers.devURL it prints, for examplehttps://tuam-corrections-relay.<your-subdomain>.workers.dev. - Run
wrangler secret put GITHUB_TOKENand paste in the token from step 4 when prompted. - Update the
RELAY_URLconstant near the top of the script incontact.htmlto the URL from step 5, then commit and push.
Page-view counter
Deploy with:
wrangler deploy -c page-counter.toml
Create the KV namespace first if needed:
wrangler kv namespace create PAGE_VIEWS
Then put the returned ID into page-counter.toml under [[kv_namespaces]].
The footer in _includes/footer.html already points at
https://tuam-page-counter.tuamrecordsproject.workers.dev.
Ongoing maintenance
None expected for either Worker under normal use. The free Workers tier is enough for a quiet archive site.