Add emoji reactions to a Jekyll site
Jekyll and GitHub Pages sites can show live emoji reactions without a plugin or a server: the loader goes in _includes/head.html, a floating bar goes in _layouts/post.html, and every post in your index loop gets an inline bar keyed to post.url. It works on GitHub Pages' default build because it's plain HTML in your templates.
Before you start
You need a Tapbar: the reactions, the look, and a publishable key (pk_live_…). Sign up, create a Tapbar with your site as an allowed site (add http://localhost:* too, to try it on a dev server), and open its Embed panel — the loader tag there already carries your key. Your AI agent can do this part for you; see the last section.
Add the loader once
The loader goes in _includes/head.html, before </head> (Minima and most themes include it from _layouts/default.html). It defines the <tapback-bar> element and starts every bar on the page, however many there are:
<script type="module" async src="https://api.tapback.party/loader.js"
data-key="pk_live_…" data-api="https://api.tapback.party"></script>
Swap pk_live_… for your own key, or paste the tag from the Embed panel as it is.
Put a floating bar on each post
In _layouts/post.html, add one bar with layout="float", keyed to page.url. It docks in the bottom corner wherever it sits in the markup, and it connects live, so readers see each other's reactions fall.
<!-- _layouts/post.html -->
<tapback-bar entity="{{ page.url }}" layout="float"></tapback-bar>Add an inline bar to each post in the list
In the posts loop (index.html or _layouts/home.html), give every post its own bar, keyed to post.url:
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
{{ post.excerpt }}
<tapback-bar entity="{{ post.url }}" layout="inline" live="off"></tapback-bar>
</article>
{% endfor %}
entity names the counter. On a list page it has to be set by hand: a bar without it infers the list page's own URL, so every blurb would share one tally. Emit the same value the post page uses and a reaction on the blurb lands on the same count as one on the post.
live="off" shows each blurb's count without opening a live socket for it; the falling reactions stay on the post page. Bars that load together share one session request (up to 50 bars each), so a reader can reload a 50-post index about ten times a minute; past a few hundred bars on one page, paginate — see Troubleshooting.
Different reactions per post (Plus)
By default every post shows your Tapbar's reactions. On Plus, a post can carry its own: add a named set in the console's Reactions card (say spooky, with a ghost and a skull), then point the post's bar at it.
<!-- _layouts/post.html -->
<tapback-bar entity="{{ page.url }}" layout="float"{% if page.tapback_set %} set="{{ page.tapback_set }}"{% endif %}></tapback-bar>
Add tapback_set: spooky to the post's front matter. Posts without it get the default bar. To list reactions on the bar instead of naming a set, use reactions="ghost,skull"; the keys have to be on the Tapbar or in its palette.
The list-page bars need no set. A live="off" bar that declares nothing never decides a post's reactions, so the post page's attribute decides them however readers arrive. The attribute applies the first time anyone loads the post; to change a post that's already live, use the ☰ picker in the console's Pages tab or the set_entity_reactions MCP tool. Changing reactions on live pages has the full rules.
To choose a post's reactions by looking at the draft instead, add the in-page picker to the draft render: guard the editor <script> with {% if jekyll.environment == 'development' %} in _includes/head.html, and put <tapback-editor> in _layouts/post.html behind the same check. jekyll build also defaults to development, so run your deploy build with JEKYLL_ENV=production (GitHub Pages already does), or gate on a flag of your own, such as site.tapback_authoring set only in a _config_dev.yml. Drafts get today's date in the default dated permalink, so give the draft a date: (or use a permalink: without dates) or its entity won't match the published post.
Check it works
- Deploy to a site on the Tapbar's allowed list (or run your dev server, with
http://localhost:*allowed). The bar only runs on allowed sites. - Open a post, tap a reaction, and reload. The count is still there.
- Open the post list. That post's blurb shows the same count.
If no bar appears, check that the loader tag is in that page's <head> and that the page's origin is allowed — www and the bare domain are separate entries. Troubleshooting maps each symptom to its fix.
Notes for Jekyll
post.urlrespects yourpermalink:config, and inside_layouts/post.htmlthe same post ispage, sopage.urlgives the identical value. Keepentity="{{ post.url }}"as it is, and run only the link throughrelative_url, so abaseurldoesn't break it.- Minima keeps
_includes/head.htmland_layouts/post.htmlinside the theme gem. Copy them into your site first:cp "$(bundle info --path minima)/_includes/head.html" _includes/, and the same for_layouts/post.html. The defaultindex.markdownuseslayout: home, so put the posts loop in a copied_layouts/home.htmlor replace the page.
Let your agent do it
Connect your agent to the Tapback MCP server — in Claude Code, claude mcp add --transport http tapback https://api.tapback.party/mcp; in Claude Desktop or claude.ai, Add custom connector with https://api.tapback.party/mcp — then paste this prompt:
Add Tapback live reactions to my Jekyll site.
1. Connect to the Tapback MCP server at https://api.tapback.party/mcp and let me approve the sign-in.
2. Ask me for my site's domain, then create a Tapbar with that domain as its allowed site. Give it a heart, a star, and a smile to start — I can change these later.
3. Show me the embed snippet and tell me exactly where it goes in Jekyll: the loader `<script>` in `_includes/head.html`, before `</head>` (Minima and most themes include it from `_layouts/default.html`); an inline bar (`layout="inline"`, `live="off"`) in the posts loop (`index.html` or `_layouts/home.html`), keyed to `post.url`; and a floating bar (`layout="float"`) in `_layouts/post.html`, keyed to `page.url`. The Jekyll guide is at https://docs.tapback.party/install/jekyll/ (as markdown: https://docs.tapback.party/install/jekyll/index.md).
4. Once I've deployed, post a test reaction and read the count back so we know it's working.Set up with your agent has the same prompt for every stack, with an optional step for the in-page picker. Manage from your agent lists everything the agent can reach.