---
title: How This Site Talks to LLMs — Mustafa Alfredji
description: Every page here ships a markdown mirror, an llms.txt index, a served AGENTS.md catalog, and answer-ready JSON-LD. Here is the whole setup, end to end.
url: "https://mustafaalfredji.com/blog/how-this-site-talks-to-llms"
type: static
generatedAt: "2026-08-07T05:10:56.612Z"
---

![A document with highlighted lines feeding into a node graph](/_image?href=%2F_astro%2Fhero.B08py7GJ.svg&w=1200&h=630&f=svg)
Search engines read HTML. Language models would rather not. This site treats LLMs as a first-class audience: every page has a clean markdown twin, the whole site is indexed in a single crawlable file, and the content that answers questions is marked up so answer engines can lift it accurately.

None of it required custom infrastructure — it is two Astro integrations and some structured data. Here is the full setup.

## The discovery layer

1. **Mirror every page as markdown.** The `pageMarkdown` integration from `@nuasite/llm-enhancements` emits a `.md` twin of every route at build time. Append `.md` to any URL on this site and you get the clean-text version of that page.
1. **Publish an index at `/llms.txt`.** The same integration writes the [llms.txt](https://llmstxt.org/) file: site name, description, and a linked list of every markdown endpoint. A discovery document at `/.well-known/llm.md` carries the full map.
1. **Serve a route catalog at `/AGENTS.md`.** The `agentsSummary` integration walks the built HTML and writes one JSON line per page — route, title, description, heading outline. The build copies it into the deploy so agents can fetch the whole site’s shape in one request.
1. **Say so in `robots.txt`.** AI crawlers get an explicit welcome, and the file points at both the sitemap and `llms.txt`.

Cost of the whole layer

About ten lines of config and one line in the build script. Everything is generated from pages that already exist — there is no second copy of the content to maintain.

## The answer layer

Discovery gets a model to the content; structured data tells it what the content claims. Every post here emits `BlogPosting` and `BreadcrumbList` JSON-LD. Posts that answer concrete questions carry a `quickAnswers` block in their frontmatter — the same data renders as the FAQ you see on the page *and* as `FAQPage` JSON-LD, so the visible answer and the machine-readable answer can never drift apart. Step-by-step sections like the one above optionally emit `HowTo`.

That single-source rule is the design principle worth stealing: never write content twice, once for humans and once for machines. Derive both from the same source, at build time, every time.

The foundation this all sits on — the design system, feature folders, and layout-owned SEO — is covered in [Building This Site on a Production-Grade Foundation](/blog/building-this-site/).

## Quick answers
What is llms.txt?+
A convention from llmstxt.org: a markdown file served at /llms.txt that gives AI crawlers a titled, linked index of machine-readable versions of your pages. It plays the role robots.txt and sitemap.xml play for search engines, but for language models that want clean text instead of HTML.
How do the markdown mirrors work?+
At build time, every page is also emitted as plain markdown at the same URL with .md appended — this post lives at both /blog/how-this-site-talks-to-llms/ and /blog/how-this-site-talks-to-llms.md. Each HTML page carries a link rel="alternate" type="text/markdown" tag pointing at its mirror, so a crawler can find it without guessing.
Why serve AGENTS.md on a website?+
AGENTS.md is a machine-readable catalog of every route: one JSON line per page with its title, description, and heading outline. An agent can fetch that single file and understand the whole site structure without scraping any HTML.

---

## Keep reading
![A stack of brand documents flowing into an AI chat panel](/_image?href=%2F_astro%2Fhero.DNqi1e3n.svg&w=1200&h=630&f=svg)
Build the System · Build the Brand

### [Load Your Brand Into a Claude or ChatGPT Project](/blog/load-your-brand-into-a-claude-or-chatgpt-project/)

The exact steps to turn brand documentation into a project your AI actually uses — Claude and ChatGPT, click by click, plus how to test that it worked.

August 7, 2026 · 5 min read
![Concentric rings on a warm paper grid, echoing the site mark](/_image?href=%2F_astro%2Fhero.B3wvGiZg.svg&w=1200&h=630&f=svg)
Build the System

### [Building This Site on a Production-Grade Foundation](/blog/building-this-site/)

Why a two-page personal site runs a tokenized design system, feature folders, layout-owned SEO, and a typed analytics catalog — and what that buys later.

July 26, 2026 · 2 min read

[← All posts](/blog/)