ogmake

OG images in Jekyll

If you deploy Jekyll via GitHub Pages, the build runs inside GitHub's own sandbox with a whitelisted plugin set (github-pages gem) — there's no way to run arbitrary Ruby at build time to compute an HMAC signature, so the signed GET /i/{keyId}/{sig} route (Signing) is off the table. A public key works everywhere Jekyll runs — GitHub Pages included — because it needs nothing at build time beyond a plain Liquid tag.

1. Create a public key

Sign in at /login, open the dashboard, check which templates the key may render (e.g. blog), then "Create public key". The key id (starts with k_) is safe to commit — it's not the bearer secret, and GitHub Pages sites are public source anyway.

Still on a hand-issued beta key? Email support@ogmake.com.

2. Add it to the default layout

In _layouts/default.html's <head>:

<meta property="og:image" content="https://ogmake.com/p/k_yourkeyid/blog?site=example.com/blog&author={{ page.author | url_encode }}&date={{ page.date | date: "%b %-d, %Y" | url_encode }}&title={{ page.title | strip_html | url_encode }}" />

Gotcha: page.excerpt carries HTML, and the layout runs on non-post pages too

page.excerpt is rendered Markdown (real <p> tags), not plain text — pipe it through strip_html before url_encode, or the API template ends up rendering literal <p> characters. And since _layouts/default.html is shared by every page, not just posts, page.author and page.date are often unset outside _posts — guard with Liquid's | default: filter (e.g. {{ page.author | default: site.author | url_encode }}) so a plain page (an "About" page, say) doesn't ship a URL with a literal empty author= field.

Verify it

bundle exec jekyll serve runs on localhost, unreachable to social crawlers — check the tag itself locally (curl -s http://localhost:4000/2026/09/21/some-post/ | grep 'og:image'), then check the real GitHub Pages URL. A bad or missing field on the public route is still a 200 fallback image rather than a visible error, so curl -I the image URL and check for x-ogmake-error (see debugging a public URL). GitHub Pages' build queue can take a minute or two after a push, and its CDN caches pages — wait for the deploy to finish before trusting a debugger result. Then run the live page through Facebook's Sharing Debugger or LinkedIn's Post Inspector; since the image URL is built entirely from front matter, add a v query param (e.g. a commit SHA) if you ever need to force a fresh crawl of a page whose front matter didn't change.