# Collections (Listings, Agents, Reviews & More)

## Collections

**Skill level:** Beginner · **Files:** `src/content/<collection>/<language>/`, defined in `src/content.config.ts`

A **collection** is a folder of similar entries: listings, developments, neighborhoods, agents, services, reviews, job openings, blog posts. Most entries are one file and one page. The list page of the collection (for example `/agents/`) takes its title and section blocks from the `-index.md` file in the same folder. Files whose name starts with `_` are ignored.

### Add An Entry
<Steps>

1. Copy an existing entry in the folder, for example `src/content/neighborhoods/english/old-mill.md`.
2. Rename the copy. The file name is the entry's **id** and its URL (`/neighborhoods/lake-view/`) unless you set `customSlug`. Other files refer to entries by this id, for example `neighborhood: "old-mill"` in a listing or `agent: "daniel-hart"`.
3. Change the frontmatter values and the Markdown body. Keep the keys.
4. Add the same file in each other language folder with the translated text and the **same file name**. `npm run astro-check` tells you when a language is missing a file.
5. If the entry should be in the header menu, add its link there too: see [Menus](/lotline/customization/menus/).

</Steps>

To hide an entry, set `draft: true`. It is left out of the built site, the lists, and the sitemap. `npm run astro-check` reports a missing required field or a value of the wrong type in every collection that has a schema.

### Every Collection
| Collection | Folder | Pages | Schema | Used by |
| --- | --- | --- | --- | --- |
| `properties` | `properties/` | `/properties/`, `/properties/<id>/` | yes | Listings sections, the `/properties/` filters, agent, neighborhood and development pages |
| `developments` | `developments/` | `/developments/`, `/developments/<id>/` | yes | Developments section |
| `neighborhoods` | `neighborhoods/` | `/neighborhoods/`, `/neighborhoods/<id>/` | yes | Neighborhoods section, the rentals home search, listing and agent pages, structured data |
| `agents` | `agents/` | `/agents/`, `/agents/<id>/` | yes (strict) | Agents section, listing and development contact cards, blog post authors |
| `services` | `services/` | `/services/`, `/services/<id>/` | yes | Services section, reviews filter |
| `reviews` | `reviews/` | none (shown on `/reviews/` and in sections) | yes | Reviews section in every layout, the reviews page |
| `careers` | `careers/` | `/careers/`, `/careers/<id>/` | yes | Open roles section, apply form, job posting data |
| `blog` | `blog/` | `/blog/`, `/blog/<id>/`, category and tag pages | yes | Blog list, blog teaser, related posts, RSS feed |
| `homepage` | `homepage/` | `/`, `/home-2/`, `/home-3/` | yes (`page`) | The homepages' named blocks |
| `pages` | `pages/` | `/<id>/` (text pages) and the pages with their own route | yes (`page`) | Legal pages, valuation, how it works, reviews, elements, components |
| `about-us` | `about-us/` | `/about/` | yes (`page`) | About page blocks |
| `faq` | `faq/` | `/faq/` | yes (`page`) | The grouped FAQ list (in its `faqSection` block) |
| `contact` | `contact/` | `/contact/` | **no schema** | Contact page blocks |
| `sections` | `sections/` | none | **no schema** | Default content of every section |

`yes (page)` means the collection uses the shared `page` schema: the fields every page accepts plus every named block. `astro-check` checks those blocks too.

<Aside type="caution" title="No schema: check by eye">
  The `sections` and `contact` collections have no schema, so `npm run
  astro-check` doesn't catch a wrong option value there, such as a misspelled
  `layout`. Check each value against the comment next to it, then open the page
  in the browser.
</Aside>

The fields every page accepts (`title`, `description`, `image`, `draft`, `customSlug`, SEO fields) work on the entries of every collection except `reviews`, which has its own short schema. They are listed in [Pages](/lotline/customization/pages/).

### Listings, Developments, Neighborhoods, Agents, Services
These five have their own guides, with every field:

- [Properties](/lotline/customization/properties/): one file per home for sale or rent
- [Developments](/lotline/customization/developments/): one file per new-build development
- [Neighborhoods](/lotline/customization/neighborhoods/): one area guide per neighborhood
- [Agents](/lotline/customization/agents/): one file per agent
- [Services & Valuation](/lotline/customization/services-valuation/): one file per service, and the valuation page

They point at each other by file name. A listing names its `neighborhood` and its `agent`, a development names its `neighborhood` and its sales `agent`, and an agent lists the `areas` they cover. When you rename or delete a neighborhood or an agent file, search the project for its old name and fix every file that points at it.

### Reviews
One file per review in `src/content/reviews/english/`, with its own schema. Every field is optional, so an empty file never fails the build, but a review only shows once `name`, `service`, `rating`, `source`, `date` and `text` are all filled in.

| Field | Type | What it does |
| --- | --- | --- |
| `name` | text | First name and last initial, such as `"Karim B."` |
| `service` | service id | The service reviewed. It drives the filter buttons on `/reviews/` and the `filter` of a reviews section |
| `rating` | whole number 1 to 5 | The stars |
| `source` | source id | One of the rating sources in `sections/<language>/rating.md` |
| `date` | date | Shown as month and year |
| `text` | text, up to 700 characters | The review |
| `area` | neighborhood id | The neighborhood. A reviews section can `filter` by it |
| `avatar`, `avatarAlt` | image path | A real portrait of the client, square. Leave it empty rather than use a placeholder face |
| `role` | text | A short line under the name, such as `"Sold a townhouse in Riverside"` |
| `featured` | true/false | Featured band on `/reviews/`, first in the home carousel |
| `reply` | `text`, `name` | A reply from the agency, under the review |
| `draft` | true/false | Hides the review |

The average score and the review count shown with the reviews are typed once in `src/content/sections/<language>/rating.md` (`value`, `count`, and a list of `sources`). Lotline never adds review stars to structured data: reviews hosted on your own site count as self-serving for Google. The sample reviews are made up: replace them with real ones, with the client's consent.

A reviews section picks reviews with `filter`: `service` (one service id), `services` (several), and `area` (a neighborhood id). The valuation page, for example, shows only selling, property management and valuation reviews.

### Careers
One file per open role:

| Field | Type | What it does |
| --- | --- | --- |
| `area` | neighborhood id or `"all"` | Where the role is based |
| `type` | `full-time` \| `part-time` \| `contract` \| `internship` \| `seasonal` | Labels from `careers.types` in `src/i18n/<language>.json` |
| `pay` | `min`, `max`, `unit` (`hour` or `year`) | Pay range, in the currency of `[settings.currency]` in `config.toml` |
| `schedule`, `start` | text | Facts in the role summary |
| `requirements` | list of text | Yes/no checks in the role summary |
| `applyUrl` | URL | Send applicants to your hiring system or a `mailto:` instead of the form |
| `date`, `validThrough` | date | Posting date and last day to apply |
| `code`, `weight` | | Role number, and order on `/careers/` (lowest first) |
| `application` | | In `-index.md`: the apply form every role page shows, and `general: true` to show it on `/careers/#apply` too. In a role: `enable: false` hides the form there |

Dates, pay and type feed the job posting data search engines read. Keep only real, open roles: replace or delete the samples before launch. When no role is published, `/careers/` shows the empty message from `open-roles-section.md`.

### Blog And Authors
- **Posts** are `.mdx` files in `src/content/blog/english/`: `title`, `description`, `image`, `imageAlt`, `date`, `updated`, `author`, `categories`, `tags`, `featured` (the lead post on `/blog/`), and `draft`.
- **Authors** are your agents. A post's `author` is a name as written in English, such as `"Omar Reyes"`. When it matches an agent file name (`omar-reyes.md`), the post shows that agent's name in the page language, role, portrait and a link to the profile. Any other name shows as written.
- **Posts per page**: `blogPagination` in `[settings]` of `config.toml`.

See [Writing Content](/lotline/customization/writing-content/) for the shortcodes you can use in posts.

### Do It With AI
```text
Add a [listing | development | neighborhood | agent | service | review | job opening | blog post] to
src/content/[folder]/english/ for: [DETAILS]. Copy the frontmatter keys of an existing entry in
that folder, keep its comments, and fill in my values only. Check the field types in
src/content.config.ts, and use file names that already exist for neighborhood, agent and service.
Then create the other language versions in src/content/[folder]/ with the same file name, and run
npm run astro-check.
```