Introduced `Sources` as an accessible Content Collection

Introduce Sources as Accessible Content Collection

Summary

Added the sources content collection to the site, enabling 209 markdown files containing reference materials, books, people, media, and other sources to be rendered and browsable through the site.

Why Care?

A flexible sources collection allows for Backlinks to an aggregation of Media, Influencers, People, Books, and UGC Communities that we can reference in other content.

Changes

Content Collection (src/content.config.ts)

  • Added sourcesCollection with ultra-permissive schema using .nullish() to handle varied frontmatter including null values
  • Schema accepts: title, og_title, url, date_created, date_modified, tags, publish (all optional/nullable)
  • Uses .passthrough() for any additional frontmatter fields
  • generateId preserves directory structure (e.g., Books/Atomic Design.mdbooks/atomic design)

Route Configuration

src/utils/routing/routeManager.ts
  • Added route mapping: { contentPath: 'sources', routePath: 'sources' }
  • Enables backlink resolution for [[sources/...]] links
src/utils/routePaths.ts
  • Added SOURCES: { BASE: '/sources' } constant

New Pages

src/pages/sources/[...slug].astro
  • Dynamic route handler for all source entries
  • Title fallback chain: titleog_title → filename (with proper casing)
  • Graceful error handling: logs issues but doesn't fail build
  • Preserves directory structure in URLs
src/pages/sources/index.astro
  • Tabbed index page for browsing sources by category
  • 10 folder tabs: Books, Brand Content, Events, Lectures, Media, Meetings, People, Reports, Source Extracts, UGC Communities
  • Plus "Uncategorized" tab for root-level files
  • Client-side filtering with entry counts per tab
  • Responsive design

Technical Details

URL Structure

Content PathSite URL
sources/OpenAlternative.md/sources/openalternative
sources/Books/Atomic Design.md/sources/books/atomic-design
sources/Media/Harvard Business Review.md/sources/media/harvard-business-review
sources/Events/2025 Kauffman Summit.md/sources/events/2025-kauffman-summit
Backlinks now resolve correctly:
  • [[sources/OpenAlternative]]/sources/openalternative
  • [[Sources/Open Alternative]]/sources/open-alternative
  • [[sources/Brand Content/Some File]]/sources/brand-content/some-file
Normalization handled by existing transformContentPathToRoute()getReferenceSlug()slugify() chain.

Build Results

  • 209 source pages generated
  • Build time: ~60 seconds
  • No critical errors

Files Changed

text
Modified:
  src/content.config.ts
  src/utils/routing/routeManager.ts
  src/utils/routePaths.ts

Created:
  src/pages/sources/[...slug].astro
  src/pages/sources/index.astro