Skip to content

Avoid unnecessary content rendering on list pages #31

@plx

Description

@plx

Summary

The list pages are eagerly rendering full content for entries even though only frontmatter-derived card data is used. This introduces unnecessary build-time work and memory churn.

Affected files:

  • src/pages/index.astro
  • src/pages/briefs/index.astro
  • src/pages/briefs/[category].astro

Why This Matters

Calling item.render() for list pages that only show titles/descriptions does extra markdown/MDX processing with no user-visible benefit.

Proposed Strategy

  • Remove Promise.all(... item.render()) from list pages where <Content /> is never used.
  • Keep collection entries as-is and pass them directly into card helper functions.
  • Preserve existing sort/filter/slice behavior.

Done Criteria / Validation

  • rg -n "await item\.render\(" src/pages/index.astro src/pages/briefs/index.astro 'src/pages/briefs/[category].astro' returns no matches.
  • npm run build passes.
  • npm run qa passes.
  • No visual regression on home/brief list pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions