Agent Wranglers

WEB-16Optional

Keep pages as data

Write each page as plain values (path, title, description, date, HTML, Markdown), not as a template full of logic.

How to do it

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. Build the markup they share as Build repeated HTML from shared modules says.

Examples

JavaScript example

// 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 example

# 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."

How to check

Add a page of a kind that already exists. git diff --stat shows one new data file and no changed template.

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/site-architecture/pages-as-data">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.