# Neighborhoods

## Neighborhoods

**Files:** `src/content/neighborhoods/<language>/`, photos in `src/assets/images/lotline/areas/` · **Skill level:** Beginner

A **neighborhood** is a guide to one area for a part of town you cover: what it's like, the schools and parks, the commute, and the homes you have there now. The demo has six: Cedar Park, Harbor District, Elm Hill, Riverside, Old Mill and Northgate.

<div class="border border-dark">
  ![A Lotline neighborhood guide with the photo band, the tagline, the commute and the highlight cards](/images/lotline/neighborhood.jpg)
</div>

Neighborhoods tie the site together. Listings, developments, agents, reviews and job openings point at them by file name, and each guide lists the homes and agents that point at it.

### A Neighborhood File
```yaml
# src/content/neighborhoods/english/elm-hill.md
---
title: "Elm Hill"
description: "Elm Hill rises on the west side of the city..."
tagline: "Quiet hillside roads with views over the city" # one line under the name on cards
image: "/images/lotline/areas/elm-hill.jpg" # 16:9 street or houses, no people
imageAlt: "Large house on a hillside road above the city"
commute: "20 minutes to the city center by car"
highlights: # 3 or 4 short notes
  - title: "Schools"
    text: "Elm Hill Academy, a K to 12 school on the lower slopes."
    icon: "GraduationCap" # Lucide icon name
  - title: "Parks"
    text: "Hilltop Reserve, with walking trails and a lookout point."
    icon: "Trees"
faq:
  - question: "Are the roads steep?"
    answer: "Some are, especially near the top..."
order: 3 # lowest first
draft: false
---

The streets are quiet and winding, with very little through traffic...
```

| Field | Type | What it does |
| --- | --- | --- |
| `title` (required) | text | The neighborhood's name, everywhere it shows |
| `description` | text | The lead paragraph on the guide |
| `tagline` | text | One line under the name, on the tiles and in the page band |
| `image`, `imageAlt` | image path, text | A 16:9 photo of a street or houses, on the tile, the guide band and the area card of each listing |
| `commute` | text | One line in the band, such as `"12 minutes to the city center by train"` |
| `highlights` | list of `title`, `text`, `icon` | Three or four short notes as white cards. `icon` is a [Lucide](https://lucide.dev/icons) icon name |
| `faq` | list of `question`, `answer` | Questions at the end of the guide. Empty hides them |
| `order` | number | Position everywhere (lowest first) |
| Named blocks | | `ctaSection` for this guide only |

The text under the frontmatter is the guide itself. Write it the way you'd describe the area to a client on the phone: the streets, the kind of homes, who tends to live there, and what's a drive away.

### The Neighborhood Page
`/neighborhoods/<file name>/` shows, top to bottom:

1. **A tall photo band** with the name, the tagline and the commute.
2. **The lead**, the Markdown copy and Ask AI links, and **the highlight cards**.
3. **The guide text.**
4. **Homes in this neighborhood**: every listing whose `neighborhood` is this file. When nothing is listed there, a short note links to the valuation page.
5. **The agents who cover it**, up to four: agents whose `areas` include this neighborhood come first, then agents with empty `areas`, who cover everywhere. The row's link is the `agentsSection` block of `src/content/neighborhoods/english/-index.md`.
6. **The questions** from `faq`.
7. The call to action band, from the file's own `ctaSection` or else the default.

<Aside type="note">
  Facts in the samples, such as school names and the prices homes "usually
  sell for", are made up and marked `# sample`. Write only what you know to be
  true about your own neighborhoods.
</Aside>

### The Neighborhoods Page And Section
`/neighborhoods/` shows every guide as a photo tile with its name and the number of homes listed there, the first tile taller than the rest. The developments home (`/home-2/`) shows the same tiles.

```yaml
# src/content/sections/english/neighborhoods-section.md
title: "Find homes by neighborhood"
description: "Pick an area to read our guide to it and see what's on the market there."
link:
  enable: false # true adds an "All neighborhoods" link beside the title
  label: "All neighborhoods"
  url: "/neighborhoods/"
ids: [] # file names in the order to show; empty = every one by `order`
limit: 6 # 0 = every neighborhood. The grid is drawn for six tiles
```

The count on each tile updates by itself as you add and remove listings.

### Other Places That Use Neighborhoods
- **The rentals home search** (`/home-3/`) lists every neighborhood in its first select. See [Listing Search](/lotline/customization/listing-search/).
- **Property pages** show an area card with the neighborhood photo, its tagline and a link to the guide.
- **Agent profiles** link the neighborhoods in their `areas`.
- **Reviews** can name a neighborhood in `area`, and a reviews section can `filter` by it.
- **Structured data**: each guide is described as your agency's service in that neighborhood, and the service pages list your neighborhoods as the areas you serve. See [SEO & AI Visibility](/lotline/customization/seo-ai-visibility/).

### Add A Neighborhood
<Steps>

1. Copy a neighborhood file, for example `src/content/neighborhoods/english/old-mill.md`, and rename it: `lake-view.md`. The file name is the URL and the id other files use.
2. Put its photo (16:9, at least 2000 px wide, no people) in `src/assets/images/lotline/areas/` and point `image` at it.
3. Fill in the fields and write the guide.
4. Copy the file into `french/` and `arabic/` with the same name and translate it.
5. Point listings at it with `neighborhood: "lake-view"`, and add it to the `areas` of the agents who cover it.
6. Run `npm run astro-check`.

</Steps>

The header menu links to `/neighborhoods/`, not to each guide, so a new guide needs no menu change.

### Remove A Neighborhood
Search the project for the file name (for example `"old-mill"`) and change every listing, development, agent, review and job that points at it. Then delete the file in every language, and its photo if nothing else uses it. A listing whose `neighborhood` points at a missing file still shows, without an area card.

### Do It With AI
```text
Add a neighborhood guide to my Lotline site: [NAME]. Tagline: [LINE]. Commute: [LINE].
Highlights (schools, parks, transport, shops): [NOTES]. Questions: [Q AND A]. Guide: [TEXT].
Photo: [FILE NAME] in src/assets/images/lotline/areas/. Copy
src/content/neighborhoods/english/old-mill.md to a new file named after it, pick a Lucide icon
name for each highlight, create the French and Arabic files with the same name, add it to the
areas of [AGENTS] in src/content/agents/, then run npm run astro-check.
```