Bring Content from Anywhere with Astro's Content Layer Loaders
summary
Builds a custom Astro Content Layer loader that pulls content from Strapi, fetches the live schema, and generate Zod schema dynamically so API responses are type-checked at build time. The loader pattern requires three parts: a name, a load function that calls the Strapi API, and a schema supplier; the demo uses those to expose a Strapi loader collection that returns typed items. Pages render blocks (media, quote, rich text, slider) via a block renderer component and the example works end-to-end.
AI-written summary · about
