feat: serve /llms.txt for AI answer engine discovery - #37
Merged
Merged
Conversation
Adds a curated /llms.txt (llmstxt.org convention) as a dynamic route handler, matching the existing robots.ts/sitemap.ts pattern. It gives AI answer engines a concise, self-describing index of the site: the crowd map, the best-time / least-crowded / crowd-index hubs, example destination pages and the "less crowded alternatives" editorial guides. The guide list is read from the same registry as the sitemap, so it never drifts out of sync. Nothing is a hand-typed crowd figure; the linked pages compute their numbers from the dataset. Verified: tsc + eslint + prettier clean; new vitest suite (4 tests) green; full app test suite 34/34 green; next build compiled and registered the route; prod render of /llms.txt returns 200 with Content-Type text/plain and all six guides listed. No em-dashes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The PackedPlaces distribution/content cluster (the 6
/guides/*link-magnets,/crowd-index,/least-crowdedand its 12 month hubs) still shows ~0 impressions in Search Console: it needs external pull, not more internal links. Meanwhile AI answer engines (ChatGPT, Perplexity, Claude, Copilot) increasingly answer exactly the queries this site is built for ("best time to visit X", "less crowded alternatives to Venice", "when is Hallstatt crowded"), and PackedPlaces has data those engines cannot get elsewhere: a transparent, per-month crowd model for 700+ destinations.The site had no
/llms.txt, so there was nothing telling those crawlers what the site is or which pages to cite.Change
Adds a curated
/llms.txt(the llmstxt.org convention) as a dynamic route handler atsrc/app/llms.txt/route.ts, mirroring the existingrobots.ts/sitemap.tspattern (sameBASE_URL,text/plainresponse). It gives AI answer engines a concise, self-describing index:The guide list is read from the same
guidesregistry the sitemap uses, so it stays in sync automatically as guides are added. Nothing here is a hand-typed crowd figure; the linked pages compute their numbers from the dataset at build time.Why this is Off-Page / distribution
This is an AI-answer-engine discovery surface, not another internal-link page. It is aimed at getting the site (especially the orphaned guides cluster) cited in AI answers for its core intents, independent of Google backlink authority. It is an emerging channel with no guaranteed consumption by any single engine, but it is zero-risk, low-maintenance and idiomatic: a sensible cheap bet for a site whose unique asset is structured, citable data.
Verified
tsc --noEmit,eslint,prettier --check: cleansrc/app/__tests__/llms.test.ts(4 tests) green; full app test suite 34/34 greennext buildcompiled and registered the route (llms.txt)next start):GET /llms.txtreturns200+Content-Type: text/plain; charset=utf-8, body starts with# PackedPlaces, all six guides listedDoes not touch existing routes; one new route + one test file.