SheetLatch / Guides

Google Sheets as a CMS for Astro

Astro fetches at build time, so the sheet is read once per build and your site stays static.

---
// src/pages/products.astro
const res = await fetch("https://sheetlatch-api.quietlathe.com/v1/SHEET_ID/Products", {
  headers: { "x-api-key": import.meta.env.SHEET_API_KEY },
});
const rows = await res.json();
---
<ul>{rows.map((r) => <li>{r.name}</li>)}</ul>

Trigger a rebuild when the sheet changes by hand or on a schedule from your host. Build-time reads cost one request each.

Early access. SheetLatch opens soon. Join the early-access list and we will email you once when it does. Planned free plan: 1,000 requests a month. SheetLatch is not affiliated with Google.