Windsurf prompt to build a blog with a CMS
This prompt builds the whole publishing path: a content model, a paginated index, slug routes with rich text rendering, an RSS feed, and a hard guarantee that drafts never reach production. Cascade seeds two posts and runs the build in Windsurf, so the slug route and the 404 case are proven, not assumed.
Last updated
Build a blog with CMS-backed content in this workspace. Model: post with title, slug, rich text body, publishedAt, and an author reference. Pages: an index listing published posts newest first with pagination, /blog/[slug] rendering the rich text, and a 404 for unknown slugs. Add an RSS feed at /rss.xml and per-post title and description meta tags. Drafts must never appear in production builds; enforce the publishedAt filter in every query that touches posts. Check package.json for an existing CMS or ORM and ask before picking one; if none exists, store content in {{database}} tables with a minimal editing route. Seed two posts, run the production build from the Windsurf terminal, and confirm the slug route, the feed, and the 404 respond correctly.Customize it
Runs in your browser. Nothing you type here is sent anywhere.
Build a blog with CMS-backed content in this workspace. Model: post with title, slug, rich text body, publishedAt, and an author reference. Pages: an index listing published posts newest first with pagination, /blog/[slug] rendering the rich text, and a 404 for unknown slugs. Add an RSS feed at /rss.xml and per-post title and description meta tags. Drafts must never appear in production builds; enforce the publishedAt filter in every query that touches posts. Check package.json for an existing CMS or ORM and ask before picking one; if none exists, store content in PostgreSQL tables with a minimal editing route. Seed two posts, run the production build from the Windsurf terminal, and confirm the slug route, the feed, and the 404 respond correctly.
Same task in other tools
Questions about this prompt
Which CMS will Cascade pick?
The prompt tells it to read package.json and ask before choosing, so the answer depends on your repo. If you already know what you want, name it in the first sentence and delete the ask step.
How do I extend the content model?
Add fields to the model line and say which are required. When the fields are stated up front, Cascade propagates them to the index, the post page, and the feed in one pass instead of leaving stragglers.
Drafts are showing up in production. How?
The published filter usually lives in only one query, and the feed or a sitemap route bypasses it. Ask Cascade to grep every query touching posts, assert the publishedAt filter in each, and add a build step that fails when a draft slug renders.