Add the button to your site
Every guide shows the file to edit and the snippet to paste. It is the same script tag everywhere; what changes is where your platform keeps the template for a single post.
-
Plain HTML
Any page you write by hand or generate yourself.
-
WordPress
Block themes in the Site Editor, or any theme with a few lines of PHP.
-
Ghost
Code injection for the script, then your theme's post template or an HTML card.
-
Hugo
Override your theme's single-page template with one line after the content.
-
Jekyll and GitHub Pages
Add it to
_layouts/post.html, even when the layout comes from a theme gem. -
Eleventy
Put it in the post layout under
_includes/. -
Astro
An inline script and the element in your blog post layout.
-
Next.js and React
Load the script once with
next/scriptand render the element in JSX.
Before you start: get a key
- Sign in with GitHub on the dashboard and add your site.
-
Create a button. In its allowed origins, list every address your site
is served from, one per line and without a path, such as
https://example.com. Add the address you preview on locally too, exactly as the browser shows it. A page on an origin that is not listed cannot load the button, so nobody else can use your key. -
Copy the key. It starts with
pk_. Below, it stands in aspk_YOUR_BUTTON_KEY.
Using a coding agent?
Claude Code, Cursor and similar agents can do the edit for you. The install section has a short prompt to paste into one; it asks for your key and puts the tag in your post template.