Publishing Your Recipe Collection as a Website
Your recipe collection is sitting in a folder on your laptop. Maybe it's a hundred .cook files organized by cuisine, maybe it's twenty files you actually use. Either way, it deserves better than being invisible.
Publishing your recipes as a website means you can share a link instead of an attachment, access your collection from any device, and let others discover your cooking. With Cooklang, your recipes are already structured — every ingredient, quantity, and step is machine-readable. That's the hard part done. This guide covers the full path from raw .cook files to a live website.
Option 1: The Built-In Server (Five Minutes)
The fastest path is CookCLI's built-in web server. It's not a static site — it's a live server you can expose to the internet — but for many people it's exactly enough.
That's it. Open http://localhost:9080 and you have a browsable recipe collection. The --host flag makes it accessible from other devices on your network.
To expose it publicly, put it behind a reverse proxy like Nginx or Caddy and add a domain. Add Let's Encrypt for HTTPS. You now have a private recipe website that you can share with family.
The limitation: the server needs to keep running. It's not a static file you can drop on any CDN. If you want something you can push to GitHub and forget about, read on.
Option 2: Static HTML from a Bash Script
If you want maximum simplicity with no build system, you can write a short script that converts every .cook file to an HTML page using cook recipe.
CookCLI can output a recipe as markdown:
Or as JSON with every field parsed:
Here's a script that generates a minimal static site from your entire recipe collection:
This requires pandoc for the markdown-to-HTML conversion step. The output is a flat directory of HTML files you can host anywhere.
Option 3: Hugo with JSON Data
Hugo is fast and has a useful feature for this: data templates. You can feed it JSON files and generate pages from them.
Generate JSON for every recipe:
Then create a Hugo layout that reads from data/recipes/:
Hugo builds the site in milliseconds. The generated files are static HTML that works on any host.
Option 4: Astro
Astro handles the JSON approach cleanly and gives you more flexibility in the component layer. Install the Cooklang parser for Node (@cooklang/cooklang) and read .cook files directly at build time:
Then in a content collection or page component, parse your .cook files and render them. Astro's island architecture means you can add interactive elements (a scaling widget, a timer) without making the whole site heavier.
The Cooklang VS Code extension helps while you're writing recipes — syntax highlighting and a live preview of how the recipe will render.
Making It Look Good
A few things matter more than the visual design:
Typography first. Recipes are read on phones in a kitchen with wet hands. Use large body text (18px+), high contrast, and generous line height. Sans-serif for ingredients, serif for the method — or just pick one font and use it consistently.
Responsive from the start. A two-column layout on desktop (ingredients left, method right) works well. On mobile, stack them: ingredients above, then method. CSS Grid handles this in ten lines.
Step numbers. Numbered method steps let someone quickly say "I'm on step 4." Use an ordered list, not paragraphs.
Recipe images. Store them alongside the .cook files with the same base name (pasta-sauce.jpg next to pasta-sauce.cook). Your build script can check for a matching image and include it automatically.
Free Hosting
GitHub Pages is the path of least resistance. Push your site to a repository, enable Pages in the settings, and it's live at yourusername.github.io/cookbook. Add a custom domain in the same settings screen if you have one.
Netlify adds auto-deploy: every push to your repository triggers a build. For a Hugo or Astro site, configure the build command and publish directory, and it handles the rest:
Cloudflare Pages works the same way and has generous free tier limits. It also puts your site on Cloudflare's CDN automatically, which makes global load times fast.
All three options are free for personal recipe sites. The main difference is deployment workflow. Pick whichever fits your existing tools.
Automating Builds with GitHub Actions
If you keep your .cook files in a Git repository, you can automate the build-and-publish step. Push a new recipe, and the site rebuilds and deploys automatically:
The workflow installs CookCLI, converts your recipes to JSON, builds the site with Hugo, and pushes the output to the gh-pages branch. After the first run, every commit to main publishes automatically.
SEO for Recipe Websites
Google has a dedicated recipe search experience with rich results — cooking time, ingredients, star ratings, and photos appearing directly in search. To qualify, your pages need structured data in JSON-LD format.
CookCLI generates this directly:
The output is valid JSON-LD using the Schema.org Recipe type:
Embed this in each recipe page inside a <script type="application/ld+json"> tag. For Hugo, you can generate the schema output alongside the JSON data file and inject it in the recipe template:
Beyond structured data, the basics apply: descriptive page titles, meta descriptions, a clean URL structure (/recipes/pasta-sauce/ not /recipes/pasta-sauce-23847.html), and images with descriptive alt text.
Join the Cooklang Federation
The Cooklang Federation indexes public recipe collections so others can discover them. If your site is public, you can add it to the index.
Your site needs to expose a feed — a JSON endpoint listing your recipes. The format is documented at the Federation site. Once you're in the index, your recipes are discoverable from the Federation's search, and people using the ecosystem's apps can subscribe to your collection.
This is what transforms a personal recipe archive into something that participates in an open network of shared cooking knowledge — no platform lock-in, no algorithm deciding who sees your recipes.
Where to Start
The fastest path: install CookCLI, run cook server --host, and see your recipes in a browser. That works in five minutes.
If you want a real public site, the Hugo approach is solid and maintainable. Generate JSON once per recipe, build with Hugo, deploy to Netlify or GitHub Pages. The GitHub Actions workflow handles the publishing automatically.
Either way, your recipes stop being private files and start being something you can link to, share, and cook from anywhere.
Get started with CookCLI → | Read the Cooklang spec →
-Alex