add-blog-post

Creates MDX blog posts with frontmatter and regenerates derived data files and OG images.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/po4yka/blog --skill add-blog-post-po4yka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-blog-post
Source: https://github.com/po4yka/blog/tree/main/.agents/skills/add-blog-post
Command: npx skills add https://github.com/po4yka/blog --skill add-blog-post-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a blog post to this Astro site requires more than writing Markdown: the MDX frontmatter must follow strict conventions, and derived artifacts like blogData.ts, OG images, RSS entries, and JSON-LD metadata must stay in sync. This Skill encodes the entire workflow so nothing is missed. ## Core Features & Use Cases - MDX Post Creation: Generates a correctly structured MDX file under src/content/blog/{en,ru}/ with all required frontmatter fields (title, date, publishedAt, summary, tags, category). - Data Regeneration: Runs npm run generate:all to rebuild blogData.ts and per-post OG images, then npm run validate:blog to confirm MDX and generated data stay in sync. - Bilingual Support: Enforces matching slugs across English and Russian variants so hreflang pairs resolve correctly. - Use Case: You want to publish a post about cutting mobile CI build times. The Skill creates the MDX file with valid frontmatter, regenerates the static data and OG image, validates sync, and reminds you to verify RSS, sitemap, and JSON-LD output. ## Quick Start Create a new blog post titled "Cutting Mobile CI Build Times" with the appropriate frontmatter, then regenerate the blog data and OG image.

Frequently Asked Questions about add-blog-post

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new blog post to an Astro MDX content collection?

Create an MDX file under src/content/blog/en/<slug>.mdx with frontmatter including title, date, publishedAt, summary, tags, and category. Then run npm run generate:all to rebuild the derived data files and OG image.

How do I generate OG images for blog posts on Cloudflare Workers?

OG images are pre-rendered at build time using Satori and Resvg via the generate-og-images script, since they cannot be rendered at runtime on Cloudflare Workers. Running npm run generate:all produces /public/og/{lang}-{slug}.png per post.

Can I edit the generated blogData.ts file directly?

No, blogData.ts is auto-generated from MDX frontmatter by the generate-blog-data script and must never be edited manually. Edit the MDX source file instead, then rerun the generator and validate with npm run validate:blog.

How do I publish a bilingual blog post with correct hreflang?

Place the English post under src/content/blog/en/<slug>.mdx and the Russian translation under src/content/blog/ru/<slug>.mdx using the identical kebab-case slug. Matching slugs let the site emit self-referential hreflang pairs and link the translated variant.

Why is the publishedAt frontmatter field required in MDX blog posts?

The publishedAt ISO date drives BlogPosting JSON-LD datePublished, RSS pubDate, and semantic time elements on the post page. Omitting it breaks structured data and feed output, so it must always be present in YYYY-MM-DD format.