Scaffold a new blog post from the template. Use when the user asks to create a new blog post, new post, new blog entry, or invokes /newPost. Prompts for title, description, and gist; derives a slug and tags; copies template.mdx plus co-located assets and the public iframe folder to the new slug, rewriting imports and frontmatter so the post is ready to edit.
Scaffold a new blog post by duplicating the template at site/src/content/blog/template.mdx (and its companion folders) into a new slug. The result is a ready-to-edit post wired up with working image, GIF, and iframe examples that the user can customize or delete.
Use AskUserQuestion to collect all three in one prompt:
After collecting, derive:
-, collapse and trim dashes. Keep it short (≤ 5 words). Show the derived slug to the user in your next message and proceed unless they push back.YYYY-MM-DD.If site/src/content/blog/<slug>.mdx or either <slug>/ folder already exists, stop and ask for a different slug.
Copy files (use Bash):
cp site/src/content/blog/template.mdx site/src/content/blog/<slug>.mdxcp -R site/src/content/blog/template site/src/content/blog/<slug>cp -R site/public/blog/template site/public/blog/<slug>mv site/public/blog/<slug>/template-example-embedded-page.html site/public/blog/<slug>/<slug>-example-embedded-page.htmlRewrite site/src/content/blog/<slug>.mdx via targeted Edit calls:
title: "Template" → title: "<title>"description: "..." → description: "<description>"pubDate: ... → pubDate: <today>draft: true → draft: falsetags: ["meta"] → tags: [<derived tags>]./template/usage-limits.png → ./<slug>/usage-limits.png./template/giphy.gif → ./<slug>/giphy.gif/blog/template/template-example-embedded-page.html → /blog/<slug>/<slug>-example-embedded-page.htmlReport to the user:
.mdx./blogs/<slug>.pnpm --filter @jeffarnoldlabs/site dev for live preview.