---
title: "Keep pages as data · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/site-architecture/pages-as-data
updated: 2026-10-20
licence: "All rights reserved"
---

# Keep pages as data

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Site architecture](https://agentwranglers.se/playbook/website/site-architecture)
- Rule: Write each page as plain values (path, title, description, date, HTML, Markdown), not as a template full of logic.
- How: Keep one module or Markdown file per page. Run pages of the same kind through one function. Then a new page is new data, not copied markup.
- Check: Add a page of a kind that already exists. `git diff --stat` shows one new data file and no changed template.

Example:

```js
// pages/about.js
export const path = '/about';
export const title = 'About us';
export const description = 'Who we are, what we do and how to reach us.';
export const updated = '2026-10-20';
export const html = '<h1>About us</h1><p>We build fast websites.</p>';
export const markdown = '# About us\n\nWe build fast websites.';
```

```python
# pages/about.py: the same page as plain values in Python
path = "/about"
title = "About us"
description = "Who we are, what we do and how to reach us."
updated = "2026-10-20"
html = "<h1>About us</h1><p>We build fast websites.</p>"
markdown = "# About us\n\nWe build fast websites."
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/site-architecture/pages-as-data`.

- Next: [Write each page once for every format](https://agentwranglers.se/playbook/website/site-architecture/one-source-many-formats)
- [Site architecture](https://agentwranglers.se/playbook/website/site-architecture)
