Add /llms.txt and /llms-full.txt via payload-plugin-llms-txt - #2
Open
logankuzyk wants to merge 4 commits into
Open
Add /llms.txt and /llms-full.txt via payload-plugin-llms-txt#2logankuzyk wants to merge 4 commits into
logankuzyk wants to merge 4 commits into
Conversation
…-llms-txt Registers the payload-plugin-llms-txt plugin for Posts, Projects, and Pages, adds Next.js route handlers at /llms.txt and /llms-full.txt mirroring the existing sitemap route pattern (unstable_cache + tags), and includes the plugin's optional admin-editable settings global (enable toggle + intro override) in the regenerated payload-types.ts. Also adds .claude/launch.json for the dev server preview tooling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The previous commit's lockfile was produced by a full rm -rf node_modules package-lock.json && npm install, which re-resolved every transitive dependency rather than just the new one. That silently changed something that broke `payload generate:importmap` in CI (npm 10, unlike local npm 11) even though direct version pins looked identical. Redone surgically: restore package.json/package-lock.json to the branch point and add only payload-plugin-llms-txt via a scoped `npm install`, so the diff is 18 lines instead of ~4800.
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.
Summary
payload-plugin-llms-txt(a new plugin published as part of this work — repo) insrc/plugins/index.tsfor the Posts, Projects, and Pages collections./llms.txtand/llms-full.txtNext.js route handlers, mirroring the existing sitemap route pattern (unstable_cache+ tags) already used for*-sitemap.xml.payload-types.ts.payload-plugin-llms-txtto the published^0.2.0(supports fallback description fields, e.g. a dedicatedllmsDescriptionfield falling back to the SEOmeta.description) — not yet wired up to a dedicated field in this PR, still usingmeta.descriptiondirectly..claude/launch.jsonfor local dev-server preview tooling.Closes the "Generate LLM txt" and "LLMs.txt support - want a way of updating it within the payload dashboard" items from the personal-website task list.
Test plan
npx tsc --noEmitpassesnpm run lintpasses (no new warnings)npm cisucceeds against the regenerated lockfile/llms.txtand/llms-full.txtrender real published content (Pages), correctly exclude unpublished Posts/ProjectsllmsDescriptionfield to Pages/Posts/Projects and wiredescriptionField: ['llmsDescription', 'meta.description']🤖 Generated with Claude Code