Skip to content

[finding] llms.txt and llms-full.txt emit site-relative links, so the map only resolves for a fetcher that remembers where it fetched from #178

Description

@hotlong

Observation from #170. Left unchanged there on purpose — see the reasoning below.

What is on main

apps/docs/app/llms.txt/route.ts emits page.url, which is a site-relative path:

- [Quickstart](/docs/quickstart): From zero to a running ObjectOS — install one CLI, run one command, you have an app.

The same is true of the per-page links inside llms-full.txt.

Why it is worth a card

llms.txt is fetched, and its contents are then lifted into a context window where the origin is no longer attached to the text. A relative path resolves only if whatever moved it there also carried the base URL. The marketing site's /llms.txt (www.objectos.ai, src/pages/llms.txt.ts) already emits absolute URLs through a small absoluteUrl(site, path) helper, so the two sibling surfaces disagree today.

sitemap.ts is the docs site's own precedent: it builds absolute URLs through localeUrl in @/lib/seo.

Why #170 did not fix it

Two reasons, both deliberate:

  1. It is out of what that card asked for — the card is about the robots directive and the file header.
  2. Doing it needs either a third copy of the base URL (robots.ts has BASE, lib/seo.ts has its own) or an import of @/lib/seo, and seo.ts was being edited concurrently on Sitemap and hreflang advertise seven locales for pages that exist only in English — 41 of 79 pages #169. Coupling two in-flight PRs over a cosmetic improvement was not worth it.

Shape of the fix

Reuse the existing helper rather than adding a fourth base-URL literal. Whether robots.ts's BASE should also collapse into lib/seo.ts is the adjacent question.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions