Skip to content

Decouple homepage rendering from external blog feed #1103

Description

@tannerlinsley

@tannerlinsley PR #1000 moved the external Standard Site feed into the shared recent-post path. That makes homepage rendering and unrelated library blog routes wait on a third-party PDS request even when no external result can affect the page.

Evidence

  • src/routes/index.tsx awaits fetchRecentPosts() in the homepage loader's Promise.all.
  • fetchRecentPosts calls getBlogCardPosts(), which always awaits getExternalBlogPosts().
  • Each uncached Standard Site source can wait up to 5 seconds before falling back to internal posts.
  • The same shared aggregator is used by fetchBlogPostsForLibrary, so docs blog routes for Table, Form, AI, and every other non-Query/Router library still fetch TkDodo's feed and then discard all external records.
  • A direct request to the configured PDS during this audit returned 90 records / 71,055 bytes in 0.85 seconds. A PDS slowdown or outage can consume the full timeout.
  • Live page responses currently advertise Cloudflare-CDN-Cache-Control: no-store; the in-process one-hour LRU reduces repeat work only while a worker isolate remains warm.

Relevant source:

  • src/routes/index.tsx
  • src/utils/blog.functions.ts
  • src/utils/external-blog-posts.server.ts

Expected impact

Removing the request-time dependency from the homepage and unrelated library routes keeps a third-party slowdown from adding up to 5 seconds to first render, reduces cold-worker network work, and preserves internal recent posts during external outages.

Proposed direction

Keep external aggregation on /blog and Query/Router blog listings. Serve homepage/nav recent posts and unrelated library listings from the local content collection unless external posts are explicitly required in those surfaces.

If external posts must appear in homepage/nav “latest” slots, ingest them ahead of requests or serve a durable stale snapshot so page rendering never waits on the PDS.

Alternatives and tradeoffs

  1. Internal-only homepage/nav recent posts — smallest and most resilient change; external posts remain discoverable in the blog index and relevant library feeds.
  2. Durable scheduled ingestion — preserves external latest-post ranking everywhere; adds storage/scheduling work.
  3. Keep request-time fetching — preserves current behavior with no new infrastructure, but intentionally leaves homepage SSR and unrelated library routes coupled to the PDS timeout.
  4. Shorter request timeout — reduces the worst case but makes external post visibility latency-dependent and does not remove unnecessary unrelated-library requests.

Decision needed

Should external posts participate in homepage/nav recent-post ranking? If not, scope external fetching to the blog index plus Query/Router listings. If yes, choose whether to add durable scheduled ingestion or accept the request-time dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    source-auditTracked by the automated source audit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions