Skip to content

Fix /press/[slug] article body rendering from Sanity #3

@sean-lai-sh

Description

@sean-lai-sh

Problem

The press detail route is fetching pressPost documents, but the long-form article body is not reliably rendering on /press/[slug]. Right now the feature looks partially wired: title/excerpt chrome exists, but the actual Sanity article text is not production-safe.

Scope

  • Reproduce the failure on a real pressPost entry
  • Verify the GROQ projection for body[] in technyu2025/lib/sanity/queries.ts
  • Verify the runtime shape expected by technyu2025/components/press/portable-text.tsx and technyu2025/components/press/press-article.tsx
  • Check published vs draft perspective behavior so seeded CMS content actually resolves on public routes
  • Add a regression test or a minimal fixture-level verification path for Portable Text rendering

Acceptance Criteria

  • Visiting /press/[slug] renders the body paragraphs from Sanity, not just the hero/title shell
  • Inline links/highlights still render correctly
  • Inline image blocks render when present
  • The route handles missing/empty body content gracefully instead of silently looking broken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions