To build a construction website with Astro, model your services and completed projects as content collections, create one page per service area for local search, add a quote request form through a form backend, show licences and insurance clearly, and add GeneralContractor structured data. A static construction website built with Astro loads fast on site-office laptops and phones alike, and there’s no CMS plugin stack or database to keep patched between jobs.
This guide covers the pages a construction company website needs, the Astro 7 code for each, and the trust signals that win quote requests.
Key Takeaways
- Prospects hire on proof: completed projects, credentials and a clear process. Build those pages before anything else.
- Model projects with sector, location, scope and duration so you can filter and reuse them across service pages.
- Create a page per service area you actually cover. It’s the main lever for “builder near me” searches.
- Use a form backend for quote requests and ask for the details your estimators need.
- Show licence numbers, insurance and accreditations as text, not just logos.
What a construction website needs
Clients comparing contractors want to know whether you’ve done work like theirs, whether you’re licensed and insured, and how to get a price.
| Page | What it must answer |
|---|---|
| Home | What you build, where, for whom, and how to request a quote |
| Services | One page per service: new builds, renovations, commercial fit-outs, extensions |
| Projects | Completed work with photos, scope, location, sector and duration |
| Service areas | One page per town or region you cover |
| About | History, team, licences, insurance, accreditations, safety approach |
| Process | Steps from first call to handover, with typical timelines |
| Request a quote | Form with project type, location, budget range and timing |
| Careers | Open roles and subcontractor enquiries |
Create the project
# Terminal
npm create astro@latest construction-site
cd construction-site
npx astro add sitemap
npm run dev
There’s no single construction category in the Komal catalog; construction themes sit mainly under Astro professional services themes and portfolio categories. Examples include Buildza, made for construction companies, contractors and builders, and Bildox, built for construction and home service businesses. Free options are worth a look too: AstroWind is a capable general business template, and Astro’s official starters give you a clean base for the project and service pages below.
Model services and projects
Services are few and stable. Projects grow over time and need facts that clients compare.
// src/content.config.ts
import { defineCollection, reference } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
const services = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/services' }),
schema: z.object({
title: z.string(),
summary: z.string().max(180),
sectors: z.array(z.enum(['Residential', 'Commercial', 'Industrial', 'Public'])),
order: z.number(),
}),
});
const projects = defineCollection({
loader: glob({ pattern: '**/index.md', base: './src/content/projects' }),
schema: ({ image }) =>
z.object({
title: z.string(),
location: z.string(),
area: z.string(),
sector: z.enum(['Residential', 'Commercial', 'Industrial', 'Public']),
service: reference('services'),
completed: z.coerce.date(),
durationWeeks: z.number(),
scope: z.array(z.string()),
valueBand: z.enum(['Under $250k', '$250k to $1m', '$1m to $5m', 'Over $5m']).optional(),
cover: image(),
coverAlt: z.string(),
gallery: z.array(z.object({ src: image(), alt: z.string() })).default([]),
clientQuote: z.object({ text: z.string(), name: z.string(), role: z.string() }).optional(),
}),
});
export const collections = { services, projects };
The area field ties each project to a service area page later. valueBand lets you signal project size without disclosing contract values. Only fill in clientQuote with a real quote the client has approved for publication. The content modeling guide covers how to choose fields like these.
Project pages that prove capability
Each project page leads with a photo and the facts, then the story: the brief, the constraints, how you solved them.
---
// src/pages/projects/[id].astro
import { getCollection, getEntry, render } from 'astro:content';
import { Image } from 'astro:assets';
import BaseLayout from '../../layouts/BaseLayout.astro';
import QuoteCta from '../../components/QuoteCta.astro';
export async function getStaticPaths() {
const projects = await getCollection('projects');
return projects.map((p) => ({ params: { id: p.id }, props: { project: p } }));
}
const { project } = Astro.props;
const { Content } = await render(project);
const d = project.data;
const service = await getEntry(d.service);
const completed = d.completed.toLocaleDateString('en-US', { month: 'long', year: 'numeric' });
---
<BaseLayout title={`${d.title}, ${d.location}`} description={`${service.data.title} project in ${d.location}, completed ${completed}.`}>
<Image src={d.cover} alt={d.coverAlt} width={1600} height={900} loading="eager" fetchpriority="high" />
<h1>{d.title}</h1>
<dl class="facts">
<div><dt>Location</dt><dd>{d.location}</dd></div>
<div><dt>Sector</dt><dd>{d.sector}</dd></div>
<div><dt>Service</dt><dd><a href={`/services/${service.id}/`}>{service.data.title}</a></dd></div>
<div><dt>Completed</dt><dd>{completed}</dd></div>
<div><dt>Programme</dt><dd>{d.durationWeeks} weeks</dd></div>
{d.valueBand && <div><dt>Project size</dt><dd>{d.valueBand}</dd></div>}
</dl>
<h2>Scope of work</h2>
<ul>{d.scope.map((item) => <li>{item}</li>)}</ul>
<Content />
{d.clientQuote && (
<blockquote>
<p>{d.clientQuote.text}</p>
<footer>{d.clientQuote.name}, {d.clientQuote.role}</footer>
</blockquote>
)}
<div class="gallery">{d.gallery.map((g) => <Image src={g.src} alt={g.alt} width={800} height={600} />)}</div>
<QuoteCta />
</BaseLayout>
On each service page, list the projects that used that service with a filtered getCollection('projects', (p) => p.data.service.id === id) call. One project then shows up wherever it’s relevant without copying it.
Service area pages for local search
Most construction searches include a place: “home extension builders Leeds”, “commercial contractor Austin”. A page per area you genuinely serve, with projects from that area, answers those searches far better than a single list of towns in the footer.
// src/data/areas.ts
export const areas = [
{ slug: 'leeds', name: 'Leeds', intro: 'Extensions, loft conversions and commercial fit-outs across Leeds and its suburbs.' },
{ slug: 'harrogate', name: 'Harrogate', intro: 'Period home renovations and new builds in Harrogate and nearby villages.' },
];
---
// src/pages/areas/[area].astro
import { getCollection } from 'astro:content';
import BaseLayout from '../../layouts/BaseLayout.astro';
import { areas } from '../../data/areas';
export async function getStaticPaths() {
const projects = await getCollection('projects');
return areas.map((area) => ({
params: { area: area.slug },
props: { area, projects: projects.filter((p) => p.data.area === area.slug) },
}));
}
const { area, projects } = Astro.props;
---
<BaseLayout title={`Builders in ${area.name}`} description={area.intro}>
<h1>Construction services in {area.name}</h1>
<p>{area.intro}</p>
<h2>Recent projects in {area.name}</h2>
<ul>{projects.map((p) => <li><a href={`/projects/${p.id}/`}>{p.data.title}</a></li>)}</ul>
</BaseLayout>
Write a genuinely useful intro for each area (typical property types, planning considerations, how long you’ve worked there). Thin pages that only swap the town name tend to be ignored by search engines and help no one.
Quote requests that estimators can use
A good quote form asks for the details your team needs to decide whether to call back and how to price. On a static site, the form posts to a form backend service, which emails your team or forwards to your CRM.
---
// src/components/QuoteForm.astro
const action = import.meta.env.PUBLIC_QUOTE_FORM_URL;
---
<form method="POST" action={action}>
<label>Name <input name="name" required autocomplete="name" /></label>
<label>Email <input name="email" type="email" required autocomplete="email" /></label>
<label>Phone <input name="phone" type="tel" autocomplete="tel" /></label>
<label>Project type
<select name="type" required>
<option>New build</option><option>Extension</option><option>Renovation</option><option>Commercial fit-out</option>
</select>
</label>
<label>Site location <input name="location" required /></label>
<label>Budget range
<select name="budget"><option>Under $250k</option><option>$250k to $1m</option><option>Over $1m</option><option>Not sure yet</option></select>
</label>
<label>Ideal start <input name="start" type="month" /></label>
<label>Project details <textarea name="details" rows="5"></textarea></label>
<button type="submit">Request a quote</button>
</form>
Native inputs such as type="month" give you a date picker with no JavaScript. The form backends guide compares services that accept static form posts, including spam protection and file uploads for drawings.
Credentials, safety and schema
Trust signals matter more in construction than in most industries, because the jobs are large and hard to undo. On the About page, list as text:
- Licence or registration numbers, with the issuing body.
- Insurance types and cover levels.
- Trade accreditations and memberships, linked to the issuing organisation’s directory where one exists.
- Your safety approach and any certifications, without inventing statistics.
Then add structured data so search engines connect the business, its location and contact details.
---
// src/components/ContractorSchema.astro
const schema = {
'@context': 'https://schema.org',
'@type': 'GeneralContractor',
name: 'Calder Build & Renovate',
url: Astro.site?.href,
telephone: '+44-113-496-0000',
address: {
'@type': 'PostalAddress',
streetAddress: 'Unit 4, Kirkstall Works',
addressLocality: 'Leeds',
postalCode: 'LS5 3BT',
addressCountry: 'GB',
},
areaServed: ['Leeds', 'Harrogate', 'Wakefield'],
};
---
<script type="application/ld+json" set:html={JSON.stringify(schema)} />
See schema.org’s GeneralContractor type for more properties. The JSON-LD guide shows how to generate schema from your data files.
Deploy and keep projects flowing
Run npm run build and deploy dist/ to Cloudflare Pages, Netlify or Vercel; our static deployment docs cover each host. The habit that keeps a construction site working is adding every completed project within a few weeks of handover, with photos taken before the client moves in. Each one is a folder with a Markdown file and images, and it appears on the projects page, its service page and its area page automatically. The official Astro content collections docs cover the collection features used here.
FAQ
Is Astro good for a construction company website?
Yes. A construction site is mostly services, project case studies and contact details, which Astro builds into fast static pages. There’s no database or plugin to update, and project pages with many photos stay fast because Astro optimizes images at build time.
What pages should a construction website have?
A home page, one page per service, a projects section with case studies, service area pages for the towns you cover, an about page with licences and insurance, a process page, a quote request form and a careers page.
How do I add a quote request form to an Astro site?
Point a standard HTML form at a form backend service, which receives the submission and emails your team or sends it to your CRM. Ask for project type, location, budget range and timing so estimators can qualify the lead.
Should a construction website show project prices?
Most contractors don’t publish exact contract values. A value band such as “$250k to $1m” signals the size of work you handle without disclosing client details, and helps prospects judge if you suit their project.
How do construction companies get more local leads from their website?
Create a useful page for each area you serve with projects from that area, keep your name, address and phone consistent with your Google Business Profile, add GeneralContractor structured data, and publish new projects regularly.