One +server.ts route — articles arrive signed and ready.
SvelteKit renders the blog; DraftSEO delivers the content. A POST handler in src/routes/webhook/+server.ts reads request.text() for the raw body and verifies the HMAC, with the secret pulled server-only from $env/static/private. It is a plain endpoint, so whatever adapter you deploy with keeps working.
| Connection | A +server.ts route — src/routes/webhook/+server.ts, recipe provided |
|---|---|
| Security | HMAC-signed + timestamped — verified over ${timestamp}.${rawBody}, replay-window protected |
| Payload | Full article JSON — title, HTML, images, meta, slug, language |
| Images | DraftSEO CDN URLs — URLs ride in the payload; rehost to your own storage if you prefer |
| Framework fit | Adapter-agnostic — secret read from $env/static/private, server-only |
Who does what
Paste the +server.ts route, verify the HMAC over request.text(), then store the post for your load functions to fetch. Once the test is green, zero effort per article.
Your routes and components own how posts look.
Setup
Connect a site → SvelteKit. You get a signing secret and the +server.ts recipe.
~1 minute
Add src/routes/webhook/+server.ts, read the secret from $env/static/private, verify the signature, store the post.
~10 minutes
DraftSEO sends a signed test event; a green check confirms the connection.
~1 minute
Every generated article is delivered to your +server.ts route on cadence.
Ongoing · zero clicks
FAQ
A JSON body { event, deliveryId, data } — data holds the title, HTML content, slug, language, meta fields and image URLs, everything a +page.svelte needs to render the post.
Each request is HMAC-signed over ${timestamp}.${rawBody} with a timestamp header; you recompute it from request.text() and reject deliveries outside the 5-minute replay window.
Yes — it is an ordinary +server.ts endpoint, so it runs on adapter-node, adapter-vercel or any other server adapter. The one requirement is a runtime that can execute a server route, so a purely static export will not receive POSTs.
No card required. Signed test delivery in under a minute.