# Content Collections & Routes

## Content Collections & Routes

**Files:** `src/content.config.ts`, `src/content/`, `src/pages/[...lang]/` · **Skill level:** Beginner

In the Sanity edition, there is no `src/content/` folder: this content is documents in your Sanity project. Routes still come from `src/pages/[...lang]/`.

Lumio’s content system is more advanced than a simple “one Markdown file equals one page” setup.

The project uses Astro content collections defined in:

- `src/content.config.ts`

### Main Collections

Lumio defines collections for:

- `pages`
- `blog`
- `services`
- `case-studies`
- `team`
- `testimonial`
- `sections`
- `homepage`, `about`, `contact`, `faq`, `pricing`, `author`, and `features`

Many collections are configurable through `config.toml`. For example:

```toml
[settings]
  blogFolder = "blog"
  servicesFolder = "services"
  caseStudiesFolder = "case-studies"
```

That means route behavior and content lookup depend partly on config, not just file names.

### The Catch-All Static Page Route

Generic static pages are rendered by:

- `src/pages/[...lang]/[page].astro`

That file:

1. loads all entries from the `pages` collection
2. creates static paths for each supported language
3. uses `SinglePageLayout.astro` to render the body

So files like these:

- `src/content/pages/english/privacy-policy.md`
- `src/content/pages/english/terms-conditions.md`
- `src/content/pages/english/components.mdx`

In the Tina edition, the privacy policy and terms are `.mdx` files.

become localized routes through that catch-all page.

### Adding A New Entry

Add a file to the language folder of a collection, such as `src/content/blog/english/`, and make one with the same filename in each other language, or that address doesn't exist there.

A new entry with only a title won't break the site, and it builds. Its card or page shows what you filled in, and images and other fields stay empty until you add them, so fill them in before you publish.

### Reusable Sections Are Not Standalone Pages

Files in `src/content/sections/<language>/` are usually not routed directly.

They are data sources for section components such as:

- `src/layouts/components/sections/AboutCompanySection.astro`
- `src/layouts/components/sections/ContactSection.astro`
- `src/layouts/components/sections/PricingSection.astro`

This is why editing a section file changes multiple pages at once when that section is reused.

### Route Generation Mental Model

Use this simple rule:

- `src/pages/...` decides the route
- `src/content/...` usually provides the data
- `src/layouts/components/...` controls rendering

That separation is powerful, but it is also the main reason Lumio feels more “app-like” than a basic Markdown theme.