Jekyll As An API Endpoint
summary
Shows how a Jekyll site becomes a JSON API by adding an /api folder and layoutless pages that emit books, recipes and posts as JSON; it generates 15 books and 48 recipes collections, flattens or denormalizes relations with book IDs, and uses Liquid tricks (push to arrays, unless forloop.last) to avoid trailing commas and a JSON5 filter to include HTML. A React single‑page app consumes the files, hosted on GitHub and kept live via CloudCannon sync, and the demo edits and deploy pipeline work end to end.
AI-written summary · about
