Skip to content

Licence activation

The Yas Pro key is a text field named license_key under Design → Customize. Paste it there and save. Do not put it in a post, in code injection, or in a public file.

The key enables updates and support. It does not unlock gated features: Pro’s features work with the field empty. The site does not stop, content is not hidden, and readers never see a badge.

The key is never written into public HTML. It is available only inside Ghost Admin’s design preview (@site._preview).

If the field is empty, a bar at the top of the preview asks you to add the key in the theme settings, and it says the site keeps working without one. A normal visitor does not see the bar.

Design preview with a notice along the top asking for the licence key, and the opener underneath

The note is for an admin, inside the preview. It is separate from the newer-version notice, which reads versions.json.

If a later check rejects the key, the only change is the wording of this note. The public site stays as it was.

It arrives with the Yas Pro purchase. Copy it as it is, without extra spaces, into license_key. There is no key for free Yas, because the free edition does not ask for one.

Updating Pro is uploading the new yas-pro.zip and overwriting the theme, as in updating. The key is not a file you upload.

This part is for someone building or reviewing a Pro package.

  • assets/js/license.js loads only in the preview, and only when license_key has a value.
  • The check is off in the file (ENABLED = false) until you turn it on.
  • To turn it on: ENABLED = true, plus your STORE_ID and PRODUCT_ID.
  • The request is public: POST https://api.lemonsqueezy.com/v1/licenses/validate with license_key. No API secret belongs in the theme, and none should be put there.
  • The response is checked for valid, meta.store_id, and meta.product_id. The answer is kept for 24 hours.
  • A network or CORS error is met with silence. Readers never see a red error, because they never load the script.
  • If you want a proxy, point ENDPOINT at a small worker (a Cloudflare Worker is enough) that forwards the request, adds CORS headers, and rate-limits. The proxy can handle activate and instance_id if you need them.

The check is an admin note. It is not a lock.

Yas is free under the MIT licence. Yas Pro is a paid edition. By Yasser Maadan.