Skip to content

HTML + fetch

Static pages from a dependency-free build script, with analytics on every page.

DocsGet started

Docs menuHTML + fetch

No framework and no dependencies: build.mjs reads a collection with fetch and writes static pages to dist/, with t.js on every page. Download it from Connect your site → HTML + fetch → Starter.

Setup in three steps

  1. Keys. Copy .env.example to .env (filled in the download). The secret key is used only while building.
  2. Build. npm run build (Node 20.12 or newer).
  3. Look. npm run dev serves dist/ at http://localhost:3000; upload dist/ to any static host.
JavaScript
const res = await fetch(`${BASE}/delivery/v1/${PROJECT}/entries/article?limit=100`, {
  headers: { authorization: `Bearer ${process.env.MANIFOLIO_KEY}` },
});
const { entries, nextCursor } = await res.json();

Rebuild when content changes: point a webhook at your host's build hook. The visual editor needs a server that renders drafts, so use a framework starter for that.