add-testimonial
Use when adding testimonials or reviews to a site from any source — manual entry, Google Reviews API, or Yelp. Also use when a site’s AggregateRating schema needs to be created or updated after new reviews are added.
| Model | Source |
|---|---|
| sonnet | pack: content-creation |
Full Reference
add-testimonial
Section titled “add-testimonial”Structured testimonial management — accepts reviews from manual entry or external APIs (Google Business Profile, Yelp Fusion), creates Review and AggregateRating schema markup, generates display components, and stores reviews in a content collection or JSON file. Recalculates aggregate rating after every addition.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Google API endpoint | mybusiness.googleapis.com/v4/accounts/{id}/locations/{id}/reviews |
| Yelp API endpoint | api.yelp.com/v3/businesses/{id}/reviews — returns 3 reviews max |
| Astro storage | src/content/testimonials/[slug].json |
| Non-Astro storage | content/testimonials.json (array) |
| Schema types | Review per testimonial + AggregateRating on LocalBusiness |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Set up data structure, schema markup, and aggregate rating calculation | reference/data-and-schema.md |
| Pull reviews from manual entry, Google API, or Yelp; build display components | reference/input-sources-and-components.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.
Announcement
Section titled “Announcement”When invoked, start with: ┏━ 🧠 add-testimonial ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ [describe the testimonial being added] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛