Scriptorium · IV

Add a buy button to your Jekyll site

Jekyll sites take payments with two pasted blocks, and that includes stock GitHub Pages. There are no plugins, no gems, and no Actions workflow to set up.

Add the script tag, once

Add the script tag to the head in your default layout (_layouts/default.html) or your theme's head include (_includes/head.html).

<!-- _layouts/default.html -->
<head>
  <meta charset="utf-8" />
  <title>{{ page.title }}</title>
  <script src="https://sdk.coinmoebius.com/latest/sdk.global.js"
    crossorigin="anonymous"
    defer></script>
</head>

Name the product in your dashboard

Open your project, switch to the Products tab, and add the product: a reference you choose, a name, a price, a currency. From here the dashboard writes both blocks on this page with your real project ID. What you see below is the shape.

Place the button where you sell

Paste the button into any page, post, or include. Kramdown passes inline HTML in Markdown through by default, so mid-post works.

<coin-moebius-buy
  project-id="proj_YOUR_ID_HERE"
  product-id="t-shirt-medium"
  label="Buy a t-shirt">
</coin-moebius-buy>

Publish. The button renders with the page, and the payment picker loads the first time a buyer clicks it. Each additional product is the same block with a different reference and label.

Watch out for these

GitHub Pages needs nothing extra

Plain HTML plus our hosted script means no plugin allow-list trouble. Push to the branch you already publish from and the button is live.

Liquid leaves it alone

The button contains no curly braces, so Liquid has nothing to interpolate. Paste it as-is. No raw tags needed.

On the verified list

Jekyll is one of the platforms the docs list as confirmed working.

Ready when your page is

Free covers 150 transactions a month. No card to sign up.