Skip to content
New: Customize your theme with an AI assistant. Read the guide

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

  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.

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

CollectionFolderPagesSchemaUsed by
propertiesproperties//properties/, /properties/<id>/yesListings sections, the /properties/ filters, agent, neighborhood and development pages
developmentsdevelopments//developments/, /developments/<id>/yesDevelopments section
neighborhoodsneighborhoods//neighborhoods/, /neighborhoods/<id>/yesNeighborhoods section, the rentals home search, listing and agent pages, structured data
agentsagents//agents/, /agents/<id>/yes (strict)Agents section, listing and development contact cards, blog post authors
servicesservices//services/, /services/<id>/yesServices section, reviews filter
reviewsreviews/none (shown on /reviews/ and in sections)yesReviews section in every layout, the reviews page
careerscareers//careers/, /careers/<id>/yesOpen roles section, apply form, job posting data
blogblog//blog/, /blog/<id>/, category and tag pagesyesBlog list, blog teaser, related posts, RSS feed
homepagehomepage//, /home-2/, /home-3/yes (page)The homepages’ named blocks
pagespages//<id>/ (text pages) and the pages with their own routeyes (page)Legal pages, valuation, how it works, reviews, elements, components
about-usabout-us//about/yes (page)About page blocks
faqfaq//faq/yes (page)The grouped FAQ list (in its faqSection block)
contactcontact//contact/no schemaContact page blocks
sectionssections/noneno schemaDefault 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.

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.

Listings, Developments, Neighborhoods, Agents, Services

These five have their own guides, with every field:

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.

FieldTypeWhat it does
nametextFirst name and last initial, such as "Karim B."
serviceservice idThe service reviewed. It drives the filter buttons on /reviews/ and the filter of a reviews section
ratingwhole number 1 to 5The stars
sourcesource idOne of the rating sources in sections/<language>/rating.md
datedateShown as month and year
texttext, up to 700 charactersThe review
areaneighborhood idThe neighborhood. A reviews section can filter by it
avatar, avatarAltimage pathA real portrait of the client, square. Leave it empty rather than use a placeholder face
roletextA short line under the name, such as "Sold a townhouse in Riverside"
featuredtrue/falseFeatured band on /reviews/, first in the home carousel
replytext, nameA reply from the agency, under the review
drafttrue/falseHides 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:

FieldTypeWhat it does
areaneighborhood id or "all"Where the role is based
typefull-time | part-time | contract | internship | seasonalLabels from careers.types in src/i18n/<language>.json
paymin, max, unit (hour or year)Pay range, in the currency of [settings.currency] in config.toml
schedule, starttextFacts in the role summary
requirementslist of textYes/no checks in the role summary
applyUrlURLSend applicants to your hiring system or a mailto: instead of the form
date, validThroughdatePosting date and last day to apply
code, weightRole number, and order on /careers/ (lowest first)
applicationIn -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 for the shortcodes you can use in posts.

Do It With AI

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.
Type something to search...