@plugdash/autobuild

Pure infrastructure

Publish in the admin. Live in 60 seconds.

320 words·2min read

Fires your Cloudflare Pages, Netlify, or Vercel build hook on every publish. No git push. No manual redeploy. The admin becomes the thing that moves the site.

npm install @plugdash/autobuild
beta GitHub
import autobuild from "@plugdash/autobuild"
// in emdash plugins array:
autobuild({
  hookUrl: import.meta.env.CF_PAGES_DEPLOY_HOOK,
  allowedHosts: ["api.cloudflare.com"],
})
publish in admin -> hook fires -> deploy kicks off -> live

No UI. Pure infrastructure.

Setup

  1. Install and register

    npm install @plugdash/autobuild
    import autobuild from "@plugdash/autobuild"
    // in emdash plugins array:
    autobuild({
      hookUrl: import.meta.env.CF_PAGES_DEPLOY_HOOK,
      allowedHosts: ["api.cloudflare.com"],
    })

Get your build hook URL from Cloudflare Pages, Netlify, or Vercel. Paste it as an env var. After this, every publish rebuilds the site. Debounces 5 seconds so a batch of publishes triggers one deploy, not ten.

It looks right. But it's yours to change.

AutobuildConfig

optiontypedefaultdescription
method "POST" | "GET" "POST" HTTP method for the hook
collections string[] Which collections trigger rebuilds
statuses string[] ["published"] Trigger only on these statuses
debounceMs number 5000 Debounce window for rapid publishes
body string | object Optional request body
headers object Optional extra headers

Pairs well with

these write metadata on publish. autobuild makes sure the live site sees the new metadata within a minute.

readtime

beta

Readers decide in three seconds. Give them a reason to stay.

npm install @plugdash/readtime

tocgen

beta

Long posts deserve navigation. Your readers will find what they came for.

npm install @plugdash/tocgen
built with plugdash