BoilerPrompt
Cursor

Cursor prompt to build a blog with a CMS

A blog where the CMS is your git repo: Markdown files, frontmatter validation that fails the build loudly, and drafts that never leak to production. Cursor's agent scaffolds the index, slug pages, and RSS feed, then proves the draft exclusion with a real production build in the terminal before you accept a diff.

Last updated

Prompt
Build a blog where the CMS is the repo: posts live as Markdown files with frontmatter in content/posts, no external CMS service. Frontmatter fields are title, slug, date, draft, and tags. Generate three things: an index page listing published posts newest first, a post page at /blog/[slug] rendering Markdown with syntax highlighting for code blocks, and an RSS feed at /rss.xml. Drafts must be visible in dev and excluded from the production build, and I want a test asserting a draft slug returns 404 in production mode. Validate frontmatter at build time and fail the build with the offending filename when a field is missing. Do not add comments, search, or an admin UI. Verify with a production build in the terminal using two sample posts and one draft, then list the generated routes and every new file.

Same task in other tools

Questions about this prompt

I would rather use a hosted CMS than Markdown files. How do I adapt this?

Replace the first sentence with your CMS and @-mention its client config so the agent wires real fetch calls. Keep the draft exclusion test unchanged, hosted setups leak drafts through preview tokens just as often as file-based ones.

Does code syntax highlighting need extra setup?

The agent will pick a highlighter from your framework's ecosystem, which may be a heavy client-side one. Name the library you want in the prompt if bundle size matters, and prefer build-time highlighting for a content site.

Post ordering looks wrong for same-day posts. What happened?

Frontmatter dates without times sort unpredictably, and timezone parsing differs by runtime. Tighten the validation to require full ISO timestamps and the build will reject ambiguous dates instead of quietly shuffling the index.

Related prompts