Hosting Recipes as a Static Website
cook build web turns a folder of .cook files into a complete static website — HTML, CSS, JavaScript, and a client-side search index — that you can host anywhere or open straight from disk. No server, no database, no build pipeline.
The output is the same browsing experience as cook server, with dynamic features (shopping list, pantry, editor, scaling) stripped out.
Quick Start
That's it. Your browser opens a fully functional recipe site — including search — running entirely off the local filesystem.
To rebuild after editing recipes, just re-run cook build web. The command is idempotent.
When to Use This vs. cook server
Use cook build web when… | Use cook server when… |
|---|---|
| You want to publish recipes for others to read | You're cooking and want a live, editable site |
| You want zero-cost hosting (GitHub Pages, Netlify) | You're on a single machine or LAN |
| You need offline access on a tablet or phone | You want the shopping-list and pantry features |
| Your recipes change occasionally, not constantly | You want to edit recipes in the browser |
The two commands share the same templates, so a site you serve at home with cook server looks identical when published with cook build web.
Hosting Options
GitHub Pages
The most popular free option. Push the generated site to a gh-pages branch:
Enable Pages in the repository settings, choose the gh-pages branch, and your recipes are live at https://yourname.github.io/recipes/.
If the site lives under a subpath (anything other than the domain root), build with --base-url so internal links resolve correctly:
Netlify or Vercel
Drag and drop the _site/ folder into Netlify Drop, or wire it up to your Git repo with a build command:
Set the publish directory to dist.
Cloudflare Pages, S3, any CDN
Any host that serves static files works:
USB Stick or Local File
Because internal links are page-relative by default, the site runs straight from file://:
Copy _site/ onto a USB stick, sync it to a tablet, attach it to an email — it just works. No web server needed.
Automating with GitHub Actions
Publish on every push to main:
What's Included
The generated site has everything readers need to browse a recipe collection:
- A home page listing recipes and sub-folders
- One page per recipe with ingredients, cookware, timers, and steps
- Recipe images alongside
.cookfiles (.jpg,.png,.webp, etc.) - Menu (
.menu) pages for meal plans - Client-side search across all recipes — no server roundtrip
- The same keyboard shortcuts as
cook server(read-only ones)
What's Excluded
The static site is read-only. The following dynamic features from cook server are intentionally left out:
- Shopping list and pantry pages
- Preferences and sync
- Recipe editor and "New recipe" button
- Recipe scaling controls (output is always 1×)
- "Add to shopping list" buttons
If you need any of these, host the same recipes with cook server on a Raspberry Pi or another always-on machine.
Sharing with the Federation
Static sites pair well with the Cooklang Federation. Build your site for human readers, and keep the raw .cook files in a public Git repository so the federation crawler can pick them up. See Publishing Your Recipes for the federation submission process.
See Also
cook build webcommand reference — all options and outputscook server— the live, editable counterpart- Publishing Your Recipes — share via the federation
- Raspberry Pi Kitchen Server — host a live server at home