房源详情页在服务端渲染 Yatmo 社区地图,输出 iframe,不依赖客户端 JavaScript
yatmo-nextjs-starter — Next.js 目录站模板
作者 Yatmo
基于 Next.js App Router 的房产房源页启动模板,用 Yatmo 在服务端渲染周边地图、兴趣点、学校与通勤时间,并输出可被搜索引擎索引的社区文字。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
展示最近学校、托儿所、商店和公共交通及步行时间
社区文字作为 HTML 的一部分输出,可被搜索引擎和 AI 助手索引
generateMetadata 用社区文字首句生成描述,并输出 RealEstateListing 的 JSON-LD
支持 discreet 房源:以圆点代替图钉,隐藏街道名与坐标
Yatmo 调用经 unstable_cache 缓存 30 天,构建阶段不请求数据
模板详细介绍
这是一个面向房产房源详情页的 Next.js 启动模板,核心是把 Yatmo 的社区数据嵌入房源页面。页面由 App Router 与 React 服务端组件构成,使用 TypeScript 编写。地图、兴趣点、通勤时间、等时圈和路线通过 @yatmo/react 的 <YatmoMap> 组件呈现,该组件在服务端生成一个 iframe,不向客户端注入 JavaScript。最近的学校、托儿所、商店和公共交通及步行时间由 <YatmoPois> 组件展示,数据在服务端获取。社区文字(涵盖教育、购物、交通、道路、休闲和邻近城市)由 <YatmoNeighbourhoodText> 渲染,作为 HTML 的一部分输出,便于搜索引擎和 AI 助手索引。
数据获取使用 @yatmo/sdk 与后端密钥,并通过 unstable_cache 缓存 30 天。SEO 方面,generateMetadata 用社区文字的第一句生成页面描述,同时输出 JSON-LD 的 RealEstateListing 结构化数据。房源支持 discreet 标记:开启后地图显示圆点而非图钉,标题中不出现街道,JSON-LD 中不包含坐标。
模板在 lib/listings.ts 中内置三条示例房源,需替换为自己的 API 或数据库。页面在首次请求时渲染并按天重新验证,Yatmo 返回结果缓存 30 天;构建阶段不发起请求,因此没有密钥也能执行 npm run build。使用前需要在 Yatmo 获取后端密钥和前端密钥,前端密钥绑定域名,本地开发需加入 localhost。Yatmo 是面向房产门户、中介网络和开发者的付费服务,必须持有许可证密钥;代码本身采用 MIT 许可。
适合你的项目吗?
适用场景
- 搭建房产门户的房源详情页,需要展示周边配套与通勤信息
- 为中介或开发商网站增加基于位置的社区介绍内容
- 在现有 Next.js App Router 项目中接入 Yatmo 地图与兴趣点组件
- 需要服务端渲染社区文字以改善房源页 SEO 的场景
适合人群
- 使用 Next.js App Router 与 TypeScript 的房产类网站开发者
- 已持有或计划购买 Yatmo 许可证的房产门户、中介网络与开发者
- 需要把社区数据与结构化数据整合进房源页的团队
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
在 yatmo.com 获取后端密钥与前端密钥,前端密钥需绑定域名,本地开发时加入 localhost
- 2
复制 .env.example 为 .env.local,填入两个密钥与国家代码
- 3
执行 npm install 后运行 npm run dev,默认地址为 http://localhost:3000
- 4
lib/listings.ts 中的三条示例房源需替换为自己的 API 或数据库
- 5
Yatmo 为付费服务,需持有许可证密钥;代码采用 MIT 许可,第三方素材需另行核对授权
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用模板必须先从 yatmo.com 获取 Yatmo 许可证密钥:服务端用后端密钥,地图用前端密钥;前端密钥绑定域名,本地开发需加入 localhost。
- 代码本身为 MIT 许可,但 Yatmo 是面向房产门户、中介网络和开发者的付费服务,必须持有许可证密钥才能使用其数据与组件。
- 按通勤时间搜索、地图房源列表及其他地图功能属于进阶能力,需使用 JavaScript 插件或 @yatmo/react 中的 YatmoInteractiveMap,可能涉及额外付费或授权。
- 评分、房源增强、等时圈、路线、地理编码、静态地图图片等能力需通过 @yatmo/sdk 与 Yatmo API 使用,属于付费服务范围。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Get a Yatmo licence key at [yatmo.com](https://yatmo.com): the **backend** key for the server, the **frontend** key for the map (locked to your domains; add `localhost` while developing).
README 原文
MIT licence. Yatmo is a paid service for real estate portals, agency networks and developers; a licence key is required.
README 原文
Search by travel time, listings on the map and the other map features: [JavaScript plugin](https://documentation.yatmo.com/plugins/js-map), `<YatmoInteractiveMap>` in [@yatmo/react](https://www.npmjs.com/package/@yatmo/react).
README 原文
https://github.com/Yatmo/yatmo-nextjs-starter/blob/main/LICENSEhttps://github.com/Yatmo/yatmo-nextjs-starter/blob/main/README.mdScores, listing enrichment, isochrones, routes, geocoding, static map images: [@yatmo/sdk](https://www.npmjs.com/package/@yatmo/sdk) and the [API](https://documentation.yatmo.com/api).
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React
- 网站类型
- 目录站 · 企业官网 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-10-01
- 截图检查日期
- 2026-10-03
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-04
查看当时使用的来源资料
SHA-256: 24442ad9e60e4c00199d0086d49755a126f1d9e2fed207dd1719c79569083690
2026-10-03T16:20:51.744Z
来源文件 / 仓库# Yatmo Next.js starter: real estate listing pages with neighbourhood data
Build a modern property page with Next.js and [Yatmo](https://yatmo.com): the interactive neighbourhood map with
points of interest and travel times, the nearest schools, nurseries, supermarkets and public transport, and a written
neighbourhood text rendered on the server so search engines and AI assistants index it. App Router, React server
components, TypeScript, JSON-LD, cached Yatmo calls. 25 countries, 23 languages.
<p align="center">
<img src="docs/screenshot.png" width="800" alt="A listing page of the starter: facts, Yatmo neighbourhood map, nearest places and neighbourhood text">
</p>
[](https://vercel.com/new/clone?repository-url=https://github.com/Yatmo/yatmo-nextjs-starter&env=YATMO_BACKEND_KEY,NEXT_PUBLIC_YATMO_FRONTEND_KEY,YATMO_COUNTRY&envDescription=Your%20Yatmo%20keys%20and%20country&envLink=https://documentation.yatmo.com/license)
## Run it in 5 minutes
1. Get a Yatmo licence key at [yatmo.com](https://yatmo.com): the **backend** key for the server, the **frontend**
key for the map (locked to your domains; add `localhost` while developing). [Keys explained](https://documentation.yatmo.com/license).
2. Use this template (button on GitHub) or clone it, then:
```bash
npm install
cp .env.example .env.local # fill in the two keys and the country
npm run dev # http://localhost:3000
```
Three sample listings are in `lib/listings.ts`; replace them with your API or database.
## What the listing page does
| Part | How | File |
|---|---|---|
| Map, points of interest, travel times, isochrones, routes | `<YatmoMap>` from `@yatmo/react`: one iframe built on the server with the frontend key, no client JavaScript | `app/listings/[id]/page.tsx` |
| Nearest schools, nurseries, shops, public transport with walking times | `<YatmoPois summary={...}>` with data fetched on the server | `app/listings/[id]/page.tsx` |
| Neighbourhood text (education, shopping, transport, roads, leisure, nearby cities) | `<YatmoNeighbourhoodText text={...}>` with data fetched on the server: part of the HTML, indexable | `app/listings/[id]/page.tsx` |
| Yatmo calls | `@yatmo/sdk` with the backend key, cached 30 days with `unstable_cache` | `lib/yatmo.ts` |
| SEO | `generateMetadata` builds the description from the first neighbourhood sentence; JSON-LD `RealEstateListing` | `app/listings/[id]/page.tsx` |
| Discreet listings | `discreet: true` shows a circle instead of the pin, keeps the street out of the titles and the coordinates out of the JSON-LD | `lib/listings.ts` |
Pages are rendered on the first request and revalidated daily; the Yatmo answers are cached for 30 days, since a
neighbourhood rarely changes. Nothing is fetched at build time, so `npm run build` works without keys.
## Going further
- Search by travel time, listings on the map and the other map features: [JavaScript plugin](https://documentation.yatmo.com/plugins/js-map), `<YatmoInteractiveMap>` in [@yatmo/react](https://www.npmjs.com/package/@yatmo/react).
- Scores, listing enrichment, isochrones, routes, geocoding, static map images: [@yatmo/sdk](https://www.npmjs.com/package/@yatmo/sdk) and the [API](https://documentation.yatmo.com/api).
- Other stacks: [Vue and Nuxt](https://www.npmjs.com/package/@yatmo/vue), [web components for any site](https://www.npmjs.com/package/@yatmo/elements), [WordPress](https://wordpress.org/plugins/yatmo-map/), [Odoo](https://apps.odoo.com/apps/modules/20.0/yatmo_map), [mobile SDKs](https://github.com/Yatmo).
MIT licence. Yatmo is a paid service for real estate portals, agency networks and developers; a licence key is required.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

ai-website-cloner-template
Clone any website with one command using AI coding agents
Next.js · 启动器

Next.js SaaS Starter
Next.js SaaS Starter 是 Next.js 官方维护的 SaaS 起点模板,定位介于学习资源和可直接部署的脚手架之间。
Next.js · SaaS

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

Next-js-Boilerplate
Next-js-Boilerplate 是一个面向 Next.js 16、Tailwind CSS 4 和 TypeScript 的启动器,核心定位是开发者体验优先。
Next.js · 启动器

tailwind-nextjs-starter-blog
tailwind-nextjs-starter-blog 是一个面向个人技术博客的 Next.js 与 Tailwind CSS 启动模板,其 v2 版本基于 App Router 与 React Server Comp…
Next.js · 博客

next-forge
Production-grade Turborepo template for Next.js apps.
Next.js · 启动器
