# Restaurant website

A free restaurant website template built with Astro and TypeScript that publishes as a static site, for restaurants, cafés and bistros that want their own site. It covers menus with prices and dietary labels, opening hours with an Open now line, booking, private dining enquiries, a gallery and a find-us page, all edited in YAML and Markdown.

- Framework: Astro (JavaScript)
- Category: Websites / Food and drink
- Creates: a static site
- Plan: Free
- Price: Free
- Author: Light Cloud
- Page: https://templates.light-cloud.com/websites/food-and-drink/restaurant-website-template
- Updated: 2026-11-21

## Features

- Menus from YAML, one file each: sections, single prices or sizes such as 125 ml and bottle, and V, VG, GF and DF labels
- Open now worked out in the visitor's browser in your time zone, including sittings that run past midnight
- Lunch and dinner sittings, holiday closures and special hours, with past dates hidden automatically
- Book a table links to OpenTable, ResDiary, SevenRooms or Tock, or falls back to your phone and email
- Private dining form that posts to Formspree or any endpoint, or opens the visitor's email app filled in
- Restaurant, Menu, FAQPage and BreadcrumbList structured data, sitemap.xml, robots.txt and /llms.txt with the full menu
- WCAG 2.2 AA in light and dark mode, checked with axe-core, and about 3 KB of JavaScript
- Unit tests for hours, JSON-LD, prices and the enquiry email, plus a smoke test of the built pages

## What you need

- Free plan: it builds to a static site, which the Free plan hosts with no limit on sites
- To run it locally: Node.js 22.18 or later and npm
- Optional: PUBLIC_ENQUIRY_ENDPOINT, a Formspree or similar form URL; without it the enquiry form opens the visitor's email app
- Optional: SITE_URL, your public address for canonical links, sharing images and the sitemap

## About

Every restaurant fact lives in content/: restaurant.yaml for name, address, hours and booking, one YAML file per menu, and Markdown for the about and private dining pages. Astro content collections check each file against a schema at build time, so a time written as 5.30pm stops the build with the file and field named. The same hours code in src/lib/hours.ts produces the hours table, the structured data and the Open now line, so they never disagree. Start by replacing the demo restaurant in content/restaurant.yaml and the photos in content/images/. It builds with npm run build into dist/, and each push to your copy redeploys, so changing the menu is a commit.

## Questions

### Is there a free restaurant website template with a menu and opening hours?

Yes. This Astro template is MIT licensed and includes food and drinks menus with prices and dietary labels, weekly opening hours, holiday closures and an Open now line, all edited in YAML files.

### How do I add my menu with prices and allergens?

Edit content/menus/a-la-carte.yaml: each dish has a name, an optional description, a price (or prices for several sizes) and dietary labels. The allergens note under every menu comes from allergens in content/restaurant.yaml.

### Can I take restaurant reservations on a static website?

Yes, by linking to a booking provider. Put your OpenTable, ResDiary, SevenRooms or Tock page in booking.url and every Book a table button goes there; without one, the booking page shows your phone number and email.

### How does the private dining form send email without a server?

Set PUBLIC_ENQUIRY_ENDPOINT to a Formspree or similar endpoint and the form posts to it. Without it, the button opens the guest's email app with the enquiry filled in and addressed to eventsEmail.

### Can I host this restaurant template without Light Cloud?

Yes. Run npm run build and upload dist/ to any static host such as Netlify, Cloudflare Pages, GitHub Pages or nginx, and point the not-found page at dist/404.html. There is no Light Cloud code and no server adapter.
