# Pages

## Pages

**Skill level:** Beginner to edit, light code to add a page made of sections

Every page of Lotline is a route file in `src/pages/[...lang]/` that reads one content file in `src/content/`. You change a page by editing its content file. You only open the route file to change which sections a page shows or their order.

### Every Page And Its File
Paths are for English. Each other language has the same file in its own folder (`french/`, `arabic/`), and its pages live under `/fr/` and `/ar/`.

#### Homepages
| Page | URL | Content file (`src/content/`) |
| --- | --- | --- |
| Agency home | `/` | `homepage/english/-index.md` |
| Fine homes and developments | `/home-2/` | `homepage/english/home-2.md` |
| Rentals and property management | `/home-3/` | `homepage/english/home-3.md` |

See [Homepages](/lotline/customization/homepages/).

#### Listings, Places, And People
| Page | URL | Content file |
| --- | --- | --- |
| Properties with filters | `/properties/` | `properties/english/-index.md` |
| Property page | `/properties/<file name>/` | `properties/english/<file name>.md` |
| New developments | `/developments/` | `developments/english/-index.md` |
| Development page | `/developments/<file name>/` | `developments/english/<file name>.md` |
| Neighborhoods | `/neighborhoods/` | `neighborhoods/english/-index.md` |
| Neighborhood guide | `/neighborhoods/<file name>/` | `neighborhoods/english/<file name>.md` |
| Agents | `/agents/` | `agents/english/-index.md` |
| Agent profile | `/agents/<file name>/` | `agents/english/<file name>.md` |
| Services | `/services/` | `services/english/-index.md` |
| Service page | `/services/<file name>/` | `services/english/<file name>.md` |
| Book a valuation | `/valuation/` | `pages/english/valuation.md` |

#### Company And Help
| Page | URL | Content file |
| --- | --- | --- |
| About | `/about/` | `about-us/english/-index.md` |
| How it works | `/how-it-works/` | `pages/english/how-it-works.md` |
| Reviews | `/reviews/` | `pages/english/reviews.md`, with the reviews in `reviews/english/` |
| Careers | `/careers/` | `careers/english/-index.md` |
| Job page | `/careers/<file name>/` | `careers/english/<file name>.md` |
| FAQ | `/faq/` | `faq/english/-index.md` |
| Contact | `/contact/` | `contact/english/-index.md` |

#### Blog
| Page | URL | Content file |
| --- | --- | --- |
| Blog | `/blog/` (and `/blog/page/2/` and on) | `blog/english/-index.md` |
| Blog post | `/blog/<file name>/` | `blog/english/<file name>.mdx` |
| Category and tag pages | `/blog/category/<name>/`, `/blog/tag/<name>/` | Made from the `categories` and `tags` of each post |
| RSS feed | `/blog/rss.xml` | Made from the posts |

See [Writing Content](/lotline/customization/writing-content/).

#### Text Pages, Tools, And Files
| Page | URL | Content file |
| --- | --- | --- |
| Privacy policy, terms, cookie policy | `/privacy-policy/`, `/terms-conditions/`, `/cookie-policy/` | `pages/english/privacy-policy.md`, `terms-conditions.md`, `cookie-policy.md` |
| Layout gallery | `/elements/` | `pages/english/elements.md` (`noindex`) |
| Shortcodes | `/components/` | `pages/english/components.mdx` (`noindex`) |
| Not found | any missing URL | `sections/english/not-found-section.md` |
| AI files | `/llms.txt`, `/llms-full.txt`, `<page>.md` | Made from your content. See [AI Links & llms.txt](/lotline/features/ai-links-llms/) |

Every other file in `src/content/pages/` is built as a text page at `/<file name>/`. `elements`, `how-it-works`, `reviews` and `valuation` are the exceptions: they have their own route files.

### Sample Pages To Replace Or Remove
Lotline ships with a full sample agency. The homes, names and addresses are made up. Before launch:

| Replace with your own | Where |
| --- | --- |
| The 12 sample listings and their photos | `src/content/properties/`, `src/assets/images/lotline/properties/` |
| The 3 sample developments | `src/content/developments/` |
| The 6 sample neighborhoods | `src/content/neighborhoods/` |
| The 8 sample agents | `src/content/agents/` |
| The 6 services and their fee lines | `src/content/services/` |
| The 8 sample reviews and the rating figures | `src/content/reviews/`, `src/content/sections/<language>/rating.md` |
| The 3 job openings and 8 blog posts | `src/content/careers/`, `src/content/blog/` |
| The two offices on the contact page | `contactPage` in `src/content/contact/english/-index.md` |
| The figures on the homes, about and how it works pages | The `statsSection` blocks |
| The placeholder legal texts | `privacy-policy.md`, `terms-conditions.md`, `cookie-policy.md` in `src/content/pages/` |
| The featured home in the Properties menu | `src/config/menu.<language>.json`. See [Menus](/lotline/customization/menus/) |

| Remove if you don't need it | Files |
| --- | --- |
| The two extra homepages | `home-2.astro`, `home-3.astro` in `src/pages/[...lang]/`, their files in `src/content/homepage/`, and their links in the **Company** menu |
| The shortcode examples `/components/` | `src/content/pages/english/components.mdx` (and each other language folder) |
| The layout gallery `/elements/` | `src/pages/[...lang]/elements.astro` and `pages/english/elements.md` (and each other language folder) |
| New developments, careers | Their route folders in `src/pages/[...lang]/`, their content folders, and their menu links |

Sample facts are marked `# sample` in the content files: search the project for `# sample` to find them all. The job openings feed job posting data for search engines, so keep only real, open roles.

### Page Header
Inner pages open with a page header. Its title is the page's `title`. Everything else is in a `pageHeader` block of the page file:

```yaml
# src/content/faq/english/-index.md
title: "Questions we get asked"
pageHeader:
  breadcrumb: true
  description: "Short answers to what clients ask us most."
  options:
    layout: "band" # band | tall | plain
```

The three layouts and all fields are in [Section Layouts](/lotline/customization/section-layouts/#page-header). Property, development, neighborhood and service pages use the `tall` band with the entry's own photo.

### Fields Every Page Accepts
These frontmatter fields work on page and entry files. `src/content/_file_format.md` explains most of them. The full list is the `page` schema in `src/content.config.ts`.

| Field | What it does |
| --- | --- |
| `title`, `description` | The page title and summary |
| `metaTitle`, `metaDescription` | Replace the title and description in search results only |
| `image` | Social preview image for this page, and the photo on cards for entries |
| `draft` | `true` leaves the page out of the built site |
| `customSlug` | A different URL segment than the file name. Use the same value in every language |
| `canonical`, `robots`, `keywords` | SEO overrides |
| `excludeFromSitemap`, `excludeFromAi` | Leave the page out of the sitemap, or out of `llms.txt` and the Markdown copies |
| `disableTagline` | Don't add the site tagline to this page's title |
| `date`, `updated` | Publish date and last meaningful edit, used in structured data and the sitemap |
| `headerLayout` | `overlay`, `bar` or `utility`: another header on this page. See [Header](/lotline/customization/header/) |
| `footerLayout` | `columns`, `pine` or `minimal`: another footer on this page. See [Footer](/lotline/customization/footer/) |
| `primaryCta` | The main button on this page only (`label`, `url`, `announcement`) |
| Named blocks | `pageHeader`, `ctaSection`, `faqSection`, … See [Sections](/lotline/customization/sections/#blocks-each-page-reads) |

### Add A Page
<Tabs>
  <TabItem label="A text page (no code)">

    For policies, guides, or any page of text. Lotline renders every file in `src/content/pages/` as a page.

    <Steps>

    1. Copy `src/content/pages/english/cookie-policy.md` to a new file, for example `src/content/pages/english/viewing-policy.md`. The file name becomes the URL: `/viewing-policy/`.

    2. Change `title`, `description`, `date`, and the Markdown body. The `contentPage` block adds an optional `notice` above the text, and `numbered: true` numbers the section headings. Delete the notice once the text is yours.

    3. Create the other language versions, such as `src/content/pages/french/`, with the **same file name**.

    4. Add a link to it in each `src/config/menu.<language>.json`, for example in the footer's legal column.

    </Steps>

  </TabItem>
  <TabItem label="A page made of sections (light code)">

    For landing pages that reuse Lotline's sections. The extra homepages are the model: their route reads one file from the `homepage` collection and renders its sections in order.

    <Steps>

    1. Copy `src/pages/[...lang]/home-3.astro` to `src/pages/[...lang]/landlords.astro`. The file name becomes the URL: `/landlords/`.

    2. In the new route, change `"home-3"` in `getEntryCTM("homepage", ...)` to `"landlords"`. List the blocks you use in `const { ... }`, and edit the `LayoutVariants` lines inside `<Base>` to the sections you want, top to bottom.

    3. Create `src/content/homepage/english/landlords.md` with a `title`, a `metaDescription`, and one named block per section, each with `enable: true`. Copy blocks from the other homepage files.

    4. Create the other language files, such as `src/content/homepage/french/`, add the page to the menus, and run `npm run astro-check`.

    </Steps>

    Don't build a section page from a file in `src/content/pages/`: every file there is also built as a text page at the same URL.

  </TabItem>
</Tabs>

### Remove A Page
1. Delete its route file in `src/pages/[...lang]/` and its content (file or folder) in `src/content/`, in every language.
2. Remove its links from each `src/config/menu.<language>.json` and any content file or button that links to it (search the project for the URL, for example `/careers/`).
3. Run `npm run astro-check`, then `npm run build`, to make sure nothing still points to it.

To hide a page without deleting it, set `draft: true` in its content file.

<Aside type="note">
  The three homepages don't read `draft`. To remove an extra homepage, delete its
  route and content files. A `draft: true` in a collection's `-index.md` hides
  the list page only (for example `/agents/`). The entries keep their own pages
  until you set `draft: true` in each of them.
</Aside>

### Do It With AI
```text
Remove the pages I don't need from my Lotline site: [LIST, e.g. /home-2/, /careers/,
/developments/]. For each one, delete its route in src/pages/[...lang]/ and its content in
src/content/ (every language), remove every link to it from each src/config/menu.<language>.json
and from content files, then run npm run astro-check and npm run build and fix anything
that still points to it.
```