菜单以语义化 HTML 输出,包含分区、描述、价格、饮食标签与点线价格引导,数据来自 config/site.ts
tablefork-nextjs-restaurant-template — Next.js 企业官网模板
作者 haider484991
基于 Next.js 的免费餐厅官网模板,菜单以语义化 HTML 呈现,内置营业时间、预订表单与本地 SEO 结构化数据,所有内容集中在单个配置文件中。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
营业时间用 24 小时制字符串配置,页面显示与 JSON-LD 结构化数据由同一份配置生成,并处理跨午夜闭店
预订表单提供人数选择并阻止过去日期,默认不提交到后端,可通过一行配置指向 OpenTable、Resy、SevenRooms 或 Formspree
自动生成 Restaurant、Menu、MenuSection、MenuItem 与逐日 OpeningHoursSpecification 的 JSON-LD
支持静态导出,构建产物为纯 HTML/CSS/JS,可部署到任意静态托管平台
深色模式使用 class 策略,带 localStorage 持久化、系统偏好检测与防闪烁内联脚本
模板详细介绍
Table & Fork 是一个面向餐厅场景的静态网站模板,使用 Next.js 构建并支持静态导出,构建产物为纯 HTML/CSS/JS,可部署到 Cloudflare Pages、Netlify、Vercel 或 GitHub Pages 等静态托管平台。模板把餐厅名称、联系方式、营业时间、菜单与文案集中放在 config/site.ts 中,修改该文件后页面内容与结构化数据会同步更新。
菜单使用语义化 HTML 而非 PDF,包含分区、描述、价格与饮食标签;营业时间以 24 小时制字符串配置,页面上的显示格式与 JSON-LD 数据均由同一份配置生成,并处理跨午夜闭店时间。预订表单提供人数选择并阻止过去日期,默认不提交到任何后端,需将 reservations.action 指向 OpenTable、Resy、SevenRooms 或 Formspree 等端点才能接收真实预订。模板还输出 Restaurant、Menu、MenuSection、MenuItem 及逐日营业时间的 JSON-LD,并支持深色模式与响应式布局。
视觉部分不依赖图片或视频文件,首页、画廊与纹理均由 CSS 渐变绘制,因此上线时没有可授权的图片素材,后续可自行替换为真实照片。演示中的图片、字体、图标等第三方素材需按各自许可单独核对,不能仅凭代码的 MIT 许可判断。README 中关于生产就绪、性能与部署便利性的表述属于作者描述,本介绍仅整理其功能与配置方式。
适合你的项目吗?
适用场景
- 为独立餐厅、咖啡馆或小酒馆搭建以菜单展示和预订引导为主的官网
- 需要让菜单内容被搜索引擎读取、而不是以 PDF 形式发布的餐厅站点
- 希望把营业时间、地址和电话放在首屏,并自动输出本地 SEO 结构化数据的场景
- 没有后端服务、计划用静态托管免费部署的餐厅网站
- 需要深色模式与移动端适配的餐饮类展示页面
适合人群
- 餐厅、咖啡馆、酒吧等餐饮经营者
- 为餐饮客户制作官网的前端开发者或设计工作室
- 希望基于 Next.js 与 TypeScript 二次开发的学习者
- 需要静态导出并自行选择托管平台的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后执行 npm install 与 npm run dev,本地默认在 3000 端口预览
- 2
站点名称、联系方式、营业时间、菜单与文案统一在 config/site.ts 中修改
- 3
接收真实预订需将 reservations.action 设置为预订服务商端点;保持为 "#" 时表单只显示内置演示确认
- 4
菜单标签 v、vg、gf、popular、new 可在 components/sections/Menu.tsx 的 TAG_STYLES 中扩展
- 5
执行 npm run build 生成 /out 静态目录,再部署到 Cloudflare Pages、Netlify、Vercel 或 GitHub Pages;Formspree 等外部服务及演示素材的许可与费用需单独核对
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- README 提及 Formspree 表单服务;真实提交需配置服务端点,其使用额度与费用需单独核对。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 预订表单默认不提交到任何后端:reservations.action 保持为 "#" 时,表单只显示内置的演示确认信息,无法接收真实预订。需自行将其指向 OpenTable、Resy、SevenRooms 或 Formspree 等外部服务端点才能实际收单。
- 接收真实预订需依赖外部第三方服务(OpenTable、Resy、SevenRooms 或 Formspree),可能需要注册账号、API 密钥或产生服务费用,这些均不在模板代码许可范围内。
- 若餐厅还需在线点餐与收银功能,README 指向作者自家的付费 POS 产品(Pixel & Oak POS,Windows 平台),属于模板之外的独立商业服务,并非本免费模板的一部分。
- 该 POS 产品目前仅在卡拉奇一家餐厅实际运行,其他地区餐厅只能加入早期访问(early access),并非普遍可用的成熟服务。
- 模板本身不含任何图片或视频素材,视觉全部由 CSS 渐变绘制;若替换为真实照片,需自行取得并核对相应素材的授权许可。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
While it is `"#"`, the form shows a built-in demo confirmation instead of posting anywhere.
README 原文
point it at OpenTable, Resy, SevenRooms, or Formspree with one line
README 原文
[Pixel & Oak POS](https://pixelandoak.com/pos/online-ordering-system/) is our restaurant POS for Windows
README 原文
It runs today at a restaurant in Karachi; restaurants elsewhere can join early access.
README 原文
https://github.com/haider484991/tablefork-nextjs-restaurant-template/blob/main/LICENSEhttps://github.com/haider484991/tablefork-nextjs-restaurant-template/blob/main/README.mdSwap in real photography whenever you have it
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-12。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React · HTML
- 网站类型
- 企业官网
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-10-12
- 截图检查日期
- 2026-10-12
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-13
查看当时使用的来源资料
SHA-256: 20f285d4415333c89209d1f33041923c356785020a9fde12d578ab6ba650ba91
2026-10-12T22:55:11.214Z
来源文件 / 仓库# 🍕 Table & Fork — Free Restaurant Website Template
**A production-ready restaurant website template built with Next.js 15, TypeScript, and Tailwind CSS v4.** Real HTML menus, reservations, opening hours, and local-SEO structured data. Clone it, edit one config file, deploy for free.
**[Live demo →](https://pixelandoak-tablefork.pages.dev)**
**[Template page →](https://pixelandoak.com/templates/restaurant-website-template/)**

## Why this template exists
Most restaurant websites fail in the same four ways. This template is built specifically to avoid them:
| The common mistake | What Table & Fork does |
| --- | --- |
| Menu as a **PDF** (or a photo of a printed menu) | Real, semantic HTML — Google can read it, phones can zoom it, screen readers can speak it |
| Hours and address buried on a *Contact* page | Address, today's hours, and phone sit in the hero |
| Autoplay video that delays the menu | **Zero image or video files.** Every visual is drawn in CSS |
| No structured data | `Restaurant` + `Menu` + `OpeningHoursSpecification` JSON-LD out of the box |
That first row matters more than anything else on this list. A PDF menu is invisible to search engines, which means you rank for none of the dishes you actually serve.
## Features
- 🍽️ **A real HTML menu** — sections, descriptions, prices, dietary badges, and dotted price leaders. Driven entirely by `config/site.ts`
- 🕐 **Live open/closed badge** — computed in the browser, so it is never stale (a static site that renders "Open now" at build time will be wrong within hours)
- 📅 **Reservation form** — party-size picker, past dates blocked, works with no backend out of the box; point it at OpenTable, Resy, SevenRooms, or Formspree with one line
- 🔍 **Local-SEO structured data** — `Restaurant`, `Menu`, `MenuSection`, `MenuItem`, and per-day opening hours, generated from your config automatically
- 🌙 **Real dark mode** — class strategy, localStorage persistence, OS-preference detection, and a no-flash inline script
- 🖼️ **Zero image dependencies** — hero, gallery, and textures are all CSS gradients. Nothing to license, nothing to optimise, nothing slow. Swap in real photography whenever you have it
- ⚙️ **One-file customization** — name, hours, address, menu, prices, and copy all live in `config/site.ts`
- 📦 **Fully static export** — `npm run build` emits plain HTML/CSS/JS to `/out`. Host it free on Cloudflare Pages, Netlify, Vercel, or GitHub Pages
- ♿ **Accessible** — semantic landmarks, labelled form controls, visible focus rings, `prefers-reduced-motion` respected
- 📱 **Responsive** — tested from 375px up, with a mobile nav panel and no horizontal scroll
## Quick start
```bash
git clone https://github.com/haider484991/tablefork-nextjs-restaurant-template.git my-restaurant
```
```bash
cd my-restaurant && npm install && npm run dev
```
Open [http://localhost:3000](http://localhost:3000).
## Make it yours
Everything lives in **`config/site.ts`**. Change these and the whole site follows — including the structured data:
```ts
export const siteConfig = {
name: "Table & Fork",
title: "Table & Fork — Wood-Fired Kitchen in Riverside",
cuisine: "Italian",
priceRange: "$$",
contact: {
phone: "(555) 010-1234",
address: { street: "412 Mill Street", city: "Riverside", /* … */ },
},
hours: [
{ day: "Monday", closed: true, open: "", close: "" },
{ day: "Tuesday", closed: false, open: "17:00", close: "22:00" },
// …
],
menu: [
{
section: "Wood-fired pizza",
note: "48-hour dough, 90 seconds at 450°C.",
items: [
{
name: "Margherita",
price: "15",
description: "San Marzano, fior di latte, basil, olive oil.",
tags: ["v", "popular"],
},
],
},
],
};
```
**Menu badges:** `v` (vegetarian), `vg` (vegan), `gf` (gluten-free), `popular`, `new`. Add your own in `TAG_STYLES` inside `components/sections/Menu.tsx`.
**Hours** use 24-hour `"HH:MM"` strings. Display formatting (`5pm – 10pm`) and the JSON-LD are both generated from them, so you only write them once. Closing times past midnight are handled correctly.
**Taking real bookings:** set `reservations.action` to your provider's endpoint. While it is `"#"`, the form shows a built-in demo confirmation instead of posting anywhere.
## Deploy
Build a static site:
```bash
npm run build
```
That emits `/out`. Deploy it anywhere — no Node server required:
```bash
npx wrangler pages deploy out
```
Netlify, Vercel, GitHub Pages, and any static host work the same way. Preview the production build locally with `npm run preview`.
## Taking orders as well?
This template shows the menu and takes reservations. If the restaurant also needs online ordering and a till, [Pixel & Oak POS](https://pixelandoak.com/pos/online-ordering-system/) is our restaurant POS for Windows: a commission-free ordering website whose menu comes from the till, with every order printed in the kitchen. It runs today at a restaurant in Karachi; restaurants elsewhere can join early access.
## Tech
Next.js 15 (App Router, static export) · React 19 · TypeScript · Tailwind CSS v4 · zero runtime dependencies beyond React.
## License
MIT — free for personal and commercial use. Attribution appreciated but not required.
---
Built by [Pixel & Oak](https://pixelandoak.com/templates/restaurant-website-template/) — web design and AI development studio.
More free templates: [Nova (blog)](https://github.com/haider484991/nova-nextjs-blog-template) · [LaunchPad (SaaS)](https://github.com/haider484991/launchpad-nextjs-saas-template)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

SaaS-Boilerplate
🚀🎉📚 SaaS Boilerplate built with Next.js + Tailwind CSS + Shadcn UI + TypeScript. ⚡️ Full-stack React applic…
Next.js · SaaS

Next-JS-Landing-Page-Starter-Template
🚀 Free NextJS Landing Page Template written in Tailwind CSS 3 and TypeScript ⚡️ Made with developer experienc…
Next.js · 企业官网

next-saas-starter
⚡️ Free Next.js responsive landing page template for SaaS products made using JAMStack architecture.
Next.js · SaaS

startup-nextjs
Startup is free Next.js template for SaaS startups comes with all the essential pages, components, and section…
Next.js · SaaS

shadcn-landing-page
New design 🎉 Nextjs + Shadcn + TypeScript + Tailwind. Landing page template ease-to-use
Next.js · 企业官网

shadcn-dashboard-landing-template
Accelerate your development with a sleek, open-source admin dashboard and landing page built on Vite-React, Ne…
Next.js · 后台
