Skip to content

Project plaintext endpoints from filesystem site tree - #2

Draft
charlesberret wants to merge 1 commit into
mainfrom
cursor/plaintext-site-tree-b2b7
Draft

charlesberret wants to merge 1 commit into
mainfrom
cursor/plaintext-site-tree-b2b7

Conversation

@charlesberret

Copy link
Copy Markdown
Owner

Summary

/list.txt, /llms.txt, and /[section].txt still iterated config.console.collections, so sites that rely on filesystem IA (without declaring a collection map) emitted only the site name.

These routes now call projectSiteTree(src/content) and shared builders in site-tree.ts, using the same isPublicItem visibility gate as portfolio pages.

Changes

  • packages/site/src/site-tree.ts — public-tree helpers and buildListTxtLines / buildLlmsTxtLines / buildSectionTxt
  • packages/site/src/endpoints/{list-txt,llms-txt,section-txt}.ts — consume the tree instead of Astro collections + config map
  • packages/site/src/plaintext-endpoints.test.ts — regression against demo content

Verification

npm run build && npm run build -w @shellside/demo && grep -q console-engine apps/demo/dist/llms.txt && grep -q console-engine apps/demo/dist/list.txt && test -f apps/demo/dist/packages.txt

Exit code: 0 (demo build emits packages.txt, and both plaintext indexes mention console-engine).

Also: npm run test -w @shellside/site — 7/7 passing.

Open in Web Open in Cursor 

Fixes LAB-2317

list.txt, llms.txt, and section txt routes used config.console.collections,
which the demo no longer needs for IA. They now call projectSiteTree and
shared builders with the same visibility filter as portfolio pages.

Co-authored-by: Charles Berret <charlesberret@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants