Recipe

The schema injector

By Axel Antas-Bergkvist Published June 1, 2026
Time ~40 min for 200 posts
Cost ~$1.50 in tokens
Risk Low (frontmatter only)

Structured data is one of the few SEO wins that doesn’t require ranking changes. Schema.org JSON-LD is what unlocks rich results in Google — FAQ accordions, HowTo carousels, Article bylines — and rich results steal real estate in the listing and lift click-through by a meaningful margin. Most CMS platforms won’t generate it for you, and the official answer is usually “edit your theme to inject JSON-LD,” which is fiddly and brittle. Storing the schema with each post as frontmatter is cleaner, works for any post type, and is exactly the repetitive per-post job an assistant should do across your whole archive at once.

What you need

The recipe

  1. Pull. Run a Specter pull so each post’s title, author, dates, tags, and excerpt are local and readable.
  2. Run the schema injector. Paste the prompt below. It writes a schema: block into each post’s frontmatter and leaves the body untouched.
  3. Dry-run. Spot-check five posts — each should now carry valid JSON-LD as a multi-line YAML string — then preview with a Specter dry-run.
  4. Push, then validate. Push with Specter, then run three posts through Google’s Rich Results Test. If they pass, schema is live; request indexing to accelerate.

The prompt

You are adding schema.org JSON-LD to every post in this folder, stored as a
frontmatter field called `schema`.

For each .md file:
1. Read the body and frontmatter (title, author, dates, feature image, tags, excerpt).
2. Decide the post type:
   - HowTo: title starts with "How to" OR body has a numbered list of 3+ steps.
   - FAQ: body has 3+ Q/A pairs (headers ending in "?").
   - Article: everything else.
3. Generate the matching JSON-LD:
   - Article: headline, author, datePublished, dateModified, image, description,
     mainEntityOfPage.
   - HowTo: name, totalTime if inferable, steps extracted from the numbered list.
   - FAQ: FAQPage with mainEntity as Question objects with acceptedAnswer.
4. Write it into frontmatter as `schema`, using YAML block-scalar (|-) so it's
   preserved as a multi-line string.
5. Do NOT modify the post body — frontmatter only.
6. Skip posts under 300 words and log them with a reason.

Finish with a summary: count of Article / HowTo / FAQ added, and count skipped.

Cost and time

Blog sizeTokensCostWall-clock
50 posts~150k$0.3010 min
200 posts~600k$1.4035 min
600 posts~1.8M$490 min

Pitfalls

Where to go next

Because it touches only frontmatter, this runs cleanly back to back with the excerpt and alt-text sweep — batch both into a single dry-run review.

Buy Specter Pro — $99/year Browse all recipes