Install
Shared client
A content collection loader
Astro’s content layer treats Neural Draft like a CMS — pull posts at build time, get type-safe content with Zod validation.A blog index page
A webhook handler that triggers a rebuild
Astro itself doesn’t trigger rebuilds, but every modern host (Vercel, Netlify, Cloudflare) gives you a “deploy hook” URL. Forward Neural Draft webhooks to that URL.Hand this to your AI
“Add aWith/changelogpage that lists the last ten published blog posts tagged ‘changelog’. Use the existingndclient fromsrc/lib/neural-draft.tsand callnd.blogPosts.list({ status: 'published', tag: 'changelog', page_size: 10, sort: '-published_at' }). Render every text node with adata-translatekey (changelog.title,changelog.description) so the customer can edit copy in the Neural Draft admin.”
@neuraldraft/mcp installed, the AI will also call
register_component to make the new page editable.
Notes
- This file uses Astro’s
content.config.ts— Astro 5 syntax. On 4.x, use thedefineCollection({ loader })style from the experimental content layer. - For multi-language sites, add
import.meta.env.PUBLIC_LANGand clone the collection per locale. - The deploy hook is per-platform: Vercel, Netlify and Cloudflare Pages all expose one in project settings. Free, no rate limit.