Skip to content

feat: add paginated public collection address directory - #16

Merged
trishtzy merged 6 commits into
mainfrom
feat/public-collection-directory
Aug 4, 2026
Merged

feat: add paginated public collection address directory#16
trishtzy merged 6 commits into
mainfrom
feat/public-collection-directory

Conversation

@trishtzy

@trishtzy trishtzy commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a public address directory at /directory — an SEO-optimized, statically generated set of pages that projects the Yellowdex public API's public collections into browsable address/label tables.

Motivation

Public collections were only reachable through the extension/app. Rendering them as indexable static pages gives each collection an SEO surface (labeled crypto addresses by entity and network) and an internal-linking hub, driving organic discovery of Yellowdex.

Changes Made

  • src/lib/getDirectory.ts — build-time client for the public API (sync.yellowdex.ai/api/v1). Fetches the curated owner's public collections and up to 500 addresses per collection (the API page cap), memoized per build. Fetch failures degrade to an empty directory so the build never fails (mirrors getLatestRelease.ts). Owner defaults to yellowdex, overridable via PUBLIC_DIRECTORY_OWNER.
  • /directory routesindex.astro lists every public collection; [slug]/index.astro is a collection's canonical page 1; [slug]/[page].astro serves pages 2..N. 100 addresses per page, scoped per collection.
  • CollectionDirectoryPage.astro — shared renderer: collection title on top, an address / label / entity / network table, links to other public collections, and pagination controls.
  • SEO — descriptive <title>/description, canonical URL, rel=prev/next, and CollectionPage + BreadcrumbList JSON-LD (via a new head slot on BaseLayout). JSON-LD is serialized with a <-escaping helper to prevent script-tag breakout.
  • Discoverability/directory added to the static sitemap and llms.txt; a dynamic /directory/sitemap.xml enumerates every generated page and is referenced from robots.txt.
  • Docs — CLAUDE.md updated with the new routes and the directory projection.

Testing

  • Verified production build with pnpm build — 115 pages generated, no errors
  • Confirmed 100 rows/page, correct last-page remainder (e.g. aave p1=100, p2=82), and the 500-address cap (aave-v3 stops at page 5, no page 6)
  • Verified rel=prev/next, canonical, and dual JSON-LD blocks in generated HTML
  • Confirmed dynamic sitemap lists every directory page and robots.txt references it
  • Tested on mobile viewports (table scrolls horizontally within its container)

Breaking Changes

  • No breaking changes

Notes

  • Commits are not GPG signed, per request for this branch.
  • The directory is data-driven at build time, so nightly/deploy.yml rebuilds keep it fresh; CI builds without extra secrets.

🤖 Generated with Claude Code

Add src/lib/getDirectory.ts, a build-time client for the Yellowdex public
API that fetches the curated owner's public collections and up to 500
addresses each (100 per page). Results are memoized per build and fetch
failures degrade to an empty directory so the build never fails.

Add a named "head" slot to BaseLayout so pages can inject per-page SEO
tags (rel prev/next, JSON-LD).
Add the /directory address directory: an index of all public collections
and per-collection pages showing a table of address, label, entity, and
network, 100 rows per page.

- directory/index.astro lists every public collection with links
- directory/[slug]/index.astro is a collection's canonical page 1
- directory/[slug]/[page].astro serves pages 2..N (max 5, 500-address cap)
- CollectionDirectoryPage.astro is the shared renderer: collection title,
  address table, links to other collections, and pagination controls
- directory/sitemap.xml.ts emits a dynamic sitemap of every directory page

Each page is SEO-optimized with a descriptive title/description, canonical
URL, rel=prev/next, and CollectionPage + BreadcrumbList JSON-LD.
Add /directory to the static sitemap and the llms.txt page registry, and
reference the dynamic /directory/sitemap.xml from robots.txt so crawlers
discover every data-driven collection page.
@trishtzy
trishtzy merged commit 6ffbe7c into main Aug 4, 2026
1 check passed
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