Integration · Hosting

BetterCMS and Netlify

BetterCMS calls a URL when content publishes. On Netlify that URL is a build hook, so a publish triggers a rebuild and the new content ships with it. Set the build hook, paste it into the project revalidation webhook, and add the API key to the site environment. Three steps and no plugin to install.

What connects
Publish webhook to a Netlify build hook
Works with
Astro, Next.js, any static build
Category
Hosting

Set it up

Three steps. The fourth is only for teams who want previews.

  1. 01 Add the API key
  2. 02 Create a build hook
  3. 03 Point BetterCMS at it
  4. 04 Optional: preview drafts on deploy previews

One build hook per site, not per content type. If you want per page updates rather than full rebuilds, that is the Next.js tag revalidation path and it works on Netlify too.

  1. 01

    Add the API key

    In the Netlify site, open Site configuration, then Environment variables, and add BETTERCMS_API_KEY.

    Astro sites also need BCMS_DRAFT_SECRET if you intend to use draft preview.

  2. 02

    Create a build hook

    Netlify build hooks live under Site configuration, then Build and deploy, then Build hooks. Create one, name it after the CMS so the deploy log says why it ran, and copy the URL.

  3. 03

    Point BetterCMS at it

    In the BetterCMS project, open Settings and set the revalidation webhook to the build hook URL.

    Publish something. The deploy log should show a build triggered by the hook you named.

  4. 04

    Optional: preview drafts on deploy previews

    Give the deploy preview context its own content:read:draft key and draft secret, so a preview build can serve unpublished content and production cannot.

What it does not do

  • There is no Netlify plugin

    BetterCMS publishes no build plugin and no Netlify extension. The connection is a build hook URL and an environment variable.

  • A full rebuild every publish

    A build hook rebuilds the whole site. On a small marketing site that is fine. On a site with thousands of pages it is a real cost, and per page revalidation is the better shape.

  • Build minutes are yours

    Every publish that fires the hook consumes Netlify build minutes. A busy editorial team can move a site into a higher tier through the CMS without noticing.

  • One way

    BetterCMS does not read Netlify deploy status. A failed build shows up in Netlify, not in the CMS.

Questions people ask

  • Yes. BetterCMS runs headless, so the frontend deploys to Netlify like any other Astro or Next.js site and reads content over the Delivery API with a BETTERCMS_API_KEY environment variable.

  • Create a Netlify build hook under Site configuration, Build and deploy, Build hooks, then set the BetterCMS project revalidation webhook to that URL. Publishing fires the hook and Netlify rebuilds.

  • Yes, if the webhook points at a build hook. Every publish is a full rebuild. If that becomes expensive, move to per page revalidation on Next.js, or batch editorial work so publishes are less frequent.

Your next website starts here

See BetterCMS running on your pages, not on a sample site.