Skip to content

fix: use Jekyll collections in search.json - #45

Merged
tallnato merged 2 commits into
mainfrom
fix/nat-90-category-collection-items
Mar 26, 2026
Merged

fix: use Jekyll collections in search.json#45
tallnato merged 2 commits into
mainfrom
fix/nat-90-category-collection-items

Conversation

@tallnato

Copy link
Copy Markdown
Member

Summary

  • Replaced site.pages iteration with site[cat] to correctly discover Jekyll collection documents (lightshows, locksounds, boombox, wraps, hornsounds)
  • Used item.collection for category detection instead of path-prefix matching
  • Same pattern as the category template fix in da46884

Test plan

  • Jekyll build succeeds without errors
  • Generated search.json contains all 5 collection categories
  • Each entry has correct title, description, tags, author, category, and url
  • Search works end-to-end in browser

Fixes NAT-102

🤖 Generated with Claude Code

tallnato and others added 2 commits March 26, 2026 18:07
Jekyll requires collection directories under collections_dir to be
prefixed with underscore (e.g., content/_locksounds/ not content/locksounds/).
Without the prefix, Jekyll treats the markdown files as regular pages
instead of collection documents, causing site[page.collection_name]
to return empty and category pages to show no items.

- Renamed all 5 collection dirs: _locksounds, _lightshows, _boombox, _wraps, _hornsounds
- Updated scripts/build.ts to reference underscore-prefixed dirs
- Updated PR templates with correct directory paths

Co-Authored-By: Paperclip <noreply@paperclip.ing>
search.json was iterating site.pages which doesn't include Jekyll
collection documents. Now iterates site[cat] for each content category
and uses item.collection for category detection, matching the fix
applied to the category template in da46884.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@tallnato
tallnato merged commit 96406bd into main Mar 26, 2026
2 checks passed
@tallnato
tallnato deleted the fix/nat-90-category-collection-items branch March 26, 2026 18:41
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.

1 participant