A route map
One JSON file lists the app’s URLs: which are public, which model each loads, and by which key (/recipes/:alias loads a recipe by its alias). Anything not marked public is private by default and says noindex.
- Angular
- PHP
Your single-page app looks great. A visitor arrives, the shell loads, and they see exactly what they came for, title and metadata included. Right?
It does, as long as JavaScript runs. Every URL returns the same index.html, and JavaScript fills it in: the content, the title, the description. For nearly every visitor in a browser, that happens in an instant. But search engine crawlers and AI agents are on a mission to grab every page as quickly as possible. They don’t have the time or resources to render every pretty pixel just to get your content, so many skip JavaScript entirely, or come back for it much later.
Think of the HTML the server sends as a color-by-number page: outlines, and little numbers marking where everything goes, but no picture yet. In the browser, JavaScript fills it in. Crawlers take the page before anyone picks up a crayon, so every URL looks like the same blank outline. The fix is to send each page already filled in where it counts: its title, description, structured data and text. I built that into Tetra, my own PHP and Angular framework, and shipped it on Thyme, my recipe site, in November 2026.
Built into Tetra, my own framework, and shipped on Thyme.
Sites built on Angular, React, Vue and similar frameworks usually ship as a single-page app. Every page of one exists in two versions: the finished picture you see in the browser, and the numbered outline the server actually sent.
What the browser shows: the finished picture. The real page, with its own title, description, share tags and content. The framework fills it in right there in the browser: it reads the URL, fetches the data and draws the page.
What the server sends: the outline. One file, index.html, for every URL: /, /recipes, /recipes/mac-n-cheese. It holds a placeholder title, an empty root element and the script that fills in everything else. On its own it has no description, no structured data and no text. A missing page gets the same file with 200 OK, a “soft 404,” instead of a real 404.
People see the finished picture. Anything that reads the raw response without running the script sees only the outline, so a site of hundreds of distinct pages looks like one blank sheet, photocopied.
I’ve seen this pattern on large, well-funded sites, not just side projects. It’s easy to miss because nothing looks broken to the people who work on the site every day.
The trouble is that anything reading the raw response gets only the outline: search crawlers on their first pass, AI crawlers, link-preview bots in Slack, iMessage and LinkedIn, and visitors whose JavaScript is blocked or fails.
A crawler doesn’t use a site the way a person does. A person lands on one page and waits while it fills in, and from then on the framework handles every click. A crawler grabs each sheet straight off the pile, as a fresh request, usually from a sitemap or a link it found elsewhere, and moves on. It doesn’t wait for anyone to fill it in. So the first response for each URL is the only one that matters to it, and in a single-page app that response is always the outline.
Some crawlers do run JavaScript, but not reliably. Search engines may render it in a second, delayed pass. Most AI crawlers and link-preview bots don’t run it at all.
Thyme had exactly this problem. I captured what curl, Googlebot, GPTBot and a browser user agent got from the live site, none of them running JavaScript, before the change and again after it went live. All four got identical responses both times.
What a crawler gets from Thyme without running JavaScript. Before: the live site on November 13, 2026. After: the live site on November 15, 2026, once the change was deployed.
| Before | After | |
|---|---|---|
| Recipe page title | “Default Title” | “Easy Korean Ground Beef Bowl | Thyme” |
| Description | None | The recipe’s own |
| Canonical URL | None | The recipe’s own URL |
| Link preview | None | Title, description and the recipe’s photo |
| Structured data | None | A schema.org Recipe, valid in Google’s Rich Results Test |
| Text on a recipe page | 0 characters | 1,215 characters: ingredients and steps |
| Text on the recipe list | 0 characters | 2,112 characters, linking all 71 recipes |
| A missing recipe | 200 OK and the same shell (a soft 404) | 404 Not Found, with noindex |
| Sitemap | None | 73 pages, generated from the route map |
| API calls to show the first recipe | 1 | 0: the recipe arrives with the page |
The same recipe URL, before and after, as a crawler receives it. Trimmed to the lines that changed.
<title>Default Title</title>
<body app-root></body>/recipes/easy-korean-ground-beef-bowlHTML<title>Easy Korean Ground Beef Bowl | Thyme</title>
<meta name="description" content="Korean beef bowls are quick and easy to make. …">
<link rel="canonical" href="https://thyme.ariksavage.com/recipes/easy-korean-ground-beef-bowl">
<meta property="og:image" content="https://thyme.ariksavage.com/images/recipes/00009/easy-korean-ground-beef-main.webp">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Recipe","name":"Easy Korean Ground Beef Bowl", …}</script>
<body app-root>
<article class="prerendered recipe"><h1>Easy Korean Ground Beef Bowl</h1> … ingredients, steps …</article>
</body>Because crawlers fetch every URL directly, the server can tell which page is wanted before anything runs in the browser. So it fills in that page before handing it over. Angular’s built index.html is still the outline; PHP fills in the numbers for each request. No Node server, no full server-side rendering, and the browser app is unchanged.
One JSON file lists the app’s URLs: which are public, which model each loads, and by which key (/recipes/:alias loads a recipe by its alias). Anything not marked public is private by default and says noindex.
For each model, a mapper turns one loaded record into what its page needs: a title, description, image and canonical URL, schema.org structured data, and a minimal plain-HTML version of the content.
Every page request goes through one PHP entry point. It matches the URL, loads the record, asks the mapper and writes the result into the shell: title, description, canonical link, Open Graph and Twitter tags, robots, JSON-LD and the content. A missing record is a real 404.
robots.txt and sitemap.xml are built from the same route map, so the sitemap lists every public recipe and robots.txt lists the private areas. Unchanged pages answer 304 Not Modified with no body.
One request, one database read. The record the server loads to fill in the head also gives the app its first page, so nothing is loaded twice.
On a recipe page the server writes two blocks into the head. Search engines get the finished picture, filled in with schema.org, the numbers they know. The app gets its own sheet: the recipe exactly as the API would send it, marked with the path it was written for and the function that turns it back into the app’s model.
When the app starts, a small service checks that sheet. If it was written for the current URL, the page builds its recipe from it and skips the API call. It’s used once, for the first page only. A script fetches every recipe page and the matching API response and compares them field by field: on the live site, all 71 match exactly.
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Recipe", …}</script><script type="application/json" id="tetra-page-data"
data-tetra-path="/recipes/easy-korean-ground-beef-bowl"
data-tetra-from-schema="recipeFromSchema">{"id":9,"title":"Easy Korean Ground Beef Bowl", …}</script>application/json, so the app’s data never gets mistaken for structured data.To fill in the head, the server has to load the recipe anyway. Once it has, there’s no reason for the app to fetch the same recipe again when the shell loads. So the server writes the full record into the page as well, in a format the app can read immediately, and the app starts from it without the duplicate API call. API calls resume on the next in-app navigation, so the data never goes stale.
The recipe was already going into the JSON-LD for search engines, so the first version put the app’s copy there too, doodled in the margins of the search engines’ picture: a custom property (thyme:recipe) inside the JSON-LD, declared as raw JSON. It was a lovely little enhancement, but not part of the expected picture, and the expectation was that search engines would simply ignore it. Google’s Rich Results Test didn’t. The Recipe was valid, but it also reported “Unparsable structured data: Incorrect value type” for the doodle, on every recipe.
Moving the app’s data onto its own sheet, a separate application/json block, fixed it, and the JSON-LD became pure schema.org. The lesson: stay inside the lines search engines know, and give the app its own sheet.
Once each URL answers with its own metadata and structured data, it becomes a page that machines can understand, not just a link.
Each recipe has a distinct title, description and canonical URL, so search engines can tell the pages apart. A schema.org Recipe makes each one eligible for recipe cards with photo, times and ingredients: Google’s Rich Results Test reports every Thyme recipe as a valid Recipe, and the recipe list as a valid carousel. Shared links get their own title, description and photo instead of a blank card.
AI assistants and answer engines increasingly read the web through crawlers that don’t run JavaScript. Each recipe page now carries its ingredients and steps as plain text, and its JSON-LD gives exact values: ingredient lines, prep and cook times, servings, step order. A model can quote “prep 10 minutes, serves 4” from data instead of guessing from layout.
Most Thyme recipes are adapted from other sources. Each page credits the original with “Adapted from” and declares it as isBasedOn in the structured data, so an answer engine can see where a recipe came from, and the original author keeps the credit.
The generated robots.txt rules sit in layers (framework, app, site), so a site owner can allow or block AI crawlers from the admin area, without a code change or a deploy.
curl a few deep URLs, or use “View source.” If every page has the same title, crawlers see one blank sheet.The fix itself is small: a route map, a mapper per model and one entry point that fills in the head. What took the time was proving it: capturing what each crawler got before and after, checking every recipe’s page data against the API, and running Google’s own tests on the live site, which is where the one real surprise turned up.