Astro企业官网

terrasuite-emdash — Astro 企业官网模板

作者 havenswift-hosting

面向房产中介的 EmDash 网站模板,包含房源集合、带筛选的搜索页,以及中介上线首日所需的基础页面。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

1 个预览视图
作者提供的预览
作者提供的预览首屏预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-08查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

包含房源集合、位置分类法、菜单与可生成任意数量示例房源的种子脚本

02

搜索页支持价格区间、卧室数量等范围筛选,筛选状态在刷新后保留且 URL 可分享

03

提供首页、搜索结果、房源详情与区域聚合页等中介上线首日所需页面

04

搜索直接读取集合数据表,并附带安装索引的脚本以提升查询效率

05

单一 CSS 文件、无框架、无网络字体、不请求外部主机,颜色通过两个自定义属性控制

模板详细介绍

这是 Havenswift Hosting 为 EmDash(Cloudflare 的 CMS)制作的房产中介网站模板,基于 Astro 构建。模板提供房源集合(27 个字段、位置分类法、菜单)、首页、搜索结果页、房源详情页和按区域聚合页,并附带种子脚本与演示数据加载脚本。搜索功能直接读取集合数据表,以支持价格区间和卧室数量等范围筛选,因为 EmDash 的内容 API 没有范围操作符。模板不含地图搜索,种子数据也不含照片,中介需自行通过媒体库上传。样式为单一 CSS 文件,无框架、无网络字体、不请求外部主机,颜色通过两个自定义属性控制。

Astro企业官网

适合你的项目吗?

适用场景

  • 房产中介快速搭建包含房源展示与筛选搜索的官方网站
  • 需要按价格区间和卧室数量等条件筛选房源的房产网站
  • 希望以 EmDash 作为内容管理后台并自定义前端展示的网站项目

适合人群

  • 使用 EmDash 并需要房产中介网站模板的开发者或团队
  • 需要房源集合、搜索筛选与区域聚合页面的房产中介
  • 希望基于 Astro 和 EmDash 进行二次开发的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    可通过 npm create astro 或 npx giget 从 GitHub 仓库获取模板,npm create emdash 无法直接获取该模板

  2. 2

    首次请求时应用 schema,之后运行 node scripts/install-indexes.mjs ./data.db 安装搜索索引并重启

  3. 3

    种子数据含 24 条房源、覆盖 15 个城镇,可用 npm run seed 或 node scripts/load-demo-stock.mjs 生成更多

  4. 4

    部署在代理后时需设置 EMDASH_SITE_URL 为浏览器访问的源,否则图片 URL 会写入内部地址

  5. 5

    种子不含照片,可用 scripts/load-demo-photos.mjs --from <folder> 导入自己的 JPEG 图片

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 模板本身不提供地图搜索功能;距离查询仅存在于测量脚本中,若需地图需自行选择并接入瓦片来源。
  • 种子数据不含照片,中介需自行通过媒体库上传;房源无照片时卡片显示占位面板而非图片。
  • 无法通过 npm create emdash 获取该模板,需改用 npm create astro 或 npx giget 从 GitHub 仓库安装。
  • 部署在代理后时必须设置 EMDASH_SITE_URL 为浏览器访问源,否则图片 URL 会写入内部地址。
  • 需运行 scripts/install-indexes.mjs 安装搜索索引,否则搜索性能显著下降。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

No map search in the template. The distance query is in the measurement scripts and costs 0.097 ms at agency scale, but a map needs tiles, and which tile source an agency uses is their decision rather than ours.

README 原文

No photographs in the seed. An agency uploads its own through the media library; until a property has one, the card draws a placed panel naming the property type rather than a broken image.

README 原文

`npm create emdash` cannot fetch this: its template list is four names compiled into the package, so it only installs Cloudflare's own.

README 原文

Set `EMDASH_SITE_URL` to the browser-facing origin. Behind Apache, nginx or a tunnel the app only ever sees the internal request URL, so without it EmDash writes `http://127.0.0.1:4321/...` into the `src` and `srcset` of every image its own `<Image>` renders.

README 原文

Without the indexes in `scripts/install-indexes.mjs` the same search is 4.0 ms at 20,000, so run it.

README 原文
https://github.com/havenswift-hosting/terrasuite-emdash/blob/main/LICENSEhttps://github.com/havenswift-hosting/terrasuite-emdash/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-08。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 83 / 100
技术栈
Astro
网站类型
企业官网
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-09-29
截图检查日期
2026-10-08

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-08

查看当时使用的来源资料

SHA-256: 35eba8d1d311e86d146e3ce68fe2df4471e8e7301c27b2f794fdef1683721d7e

2026-10-08T06:26:57.117Z

来源文件 / 仓库
# TerraSuite for EmDash

An estate agency site template for [EmDash](https://emdashcms.com), Cloudflare's
CMS. A property collection, a search that answers the question a buyer actually
asks, and the pages an agency needs on its first day.

Built by [Havenswift Hosting](https://www.havenswift-hosting.co.uk/), who make
TerraSuite for WordPress and have run hosting for United Kingdom businesses
since 2005.

**[Live demo](https://emdash.terrasuite.uk/)** - 420 properties, the real thing
rather than a video.

[![The home page](screenshots/home.png)](https://emdash.terrasuite.uk/)

## What is in it

| | |
| --- | --- |
| `seed/makeseed.py` | The property collection: 27 fields, a location taxonomy, a menu, and as many sample properties as you ask for |
| `src/pages/index.astro` | Home page: one search, the newest stock, every town |
| `src/pages/search.astro` | Results, with filters that survive a page reload and a shareable URL |
| `src/pages/property/[slug].astro` | A property, read through EmDash's own content API |
| `src/pages/area/[slug].astro` | Everything on the books in one town |
| `src/lib/property-search.ts` | The search itself |
| `scripts/install-indexes.mjs` | The indexes the search needs |

One stylesheet, no framework, no webfont, nothing fetched from another host.
Colour is two custom properties, so rebranding is two lines.

## Getting started

```sh
npm create astro@latest my-agency -- --template havenswift-hosting/terrasuite-emdash
cd my-agency
npm run dev
```

The schema applies on the first request. Then put the search indexes in and
restart:

```sh
node scripts/install-indexes.mjs ./data.db
```

The site is on `http://localhost:4321/` and the admin panel is at
`/_emdash/admin`.

`npm create emdash` cannot fetch this: its template list is four names compiled
into the package, so it only installs Cloudflare's own. Anything that reads a
GitHub repository will do instead, and `create-astro` hands any template
containing a `/` straight to [giget](https://github.com/unjs/giget), so this
works too:

```sh
npx giget@latest gh:havenswift-hosting/terrasuite-emdash my-agency
```

### Sample stock

`seed/seed.json` carries 24 properties across 15 towns, which is enough to see
the search work. For more:

```sh
npm run seed                 # regenerate the seed, any number of properties
node scripts/load-demo-stock.mjs 420   # or load straight into an existing database
```

### Putting it behind a proxy

Set `EMDASH_SITE_URL` to the browser-facing origin. Behind Apache, nginx or a
tunnel the app only ever sees the internal request URL, so without it EmDash
writes `http://127.0.0.1:4321/...` into the `src` and `srcset` of every image
its own `<Image>` renders. The search results still look right, because the
cards build their own URLs, so this shows up on property pages alone and is
easy to miss.

```sh
EMDASH_SITE_URL=https://www.your-agency.com node ./dist/server/entry.mjs
```

Photographs are not in the seed. `scripts/load-demo-photos.mjs --from <folder>`
puts a folder of JPEGs into the media library and hands them out by property
type, which is how the demo site above is dressed.

## The search, and why it is not the content API

`getEmDashCollection()` filters by field values or taxonomy terms. It has **no
range operator**, so "between 150,000 and 600,000" and "at least three bedrooms"
cannot be asked at all. A sandboxed plugin's `ctx.storage.query()` has ranges
but only on declared indexes, with one sort, 100 rows a page, and no way to ask
whether a multi-valued field contains a value.

So the search reads the collection table directly, which trusted site code may
do. EmDash has already done the hard part: every collection gets a real SQL
table with a real column per field, which is the same flat index TerraSuite
builds for itself on WordPress.

`/search?engine=api` runs the same page through the content API instead, and
says which filters it had to drop. It is there because the difference is worth
seeing rather than being told about.

![Search results](screenshots/search.png)

## What it costs

Measured on a real installation, ten filters, ordered by price, first page:

| Properties | Median |
| ---------- | ------ |
| 1,000 | 0.015 ms |
| 5,000 | 0.053 ms |
| 20,000 | 0.092 ms |
| 50,000 | 0.226 ms |

Without the indexes in `scripts/install-indexes.mjs` the same search is 4.0 ms
at 20,000, so run it. It takes 291 ms over 50,000 rows.

## What it does not do

No map search in the template. The distance query is in the measurement
scripts and costs 0.097 ms at agency scale, but a map needs tiles, and which
tile source an agency uses is their decision rather than ours.

No photographs in the seed. An agency uploads its own through the media
library; until a property has one, the card draws a placed panel naming the
property type rather than a broken image. `scripts/load-demo-photos.mjs` will
dress a demo with a folder of your own JPEGs.

## Licence

MIT, the same as EmDash.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。