Ordered by Sanity’s orderRank; expands thumbnail asset, crop, and categories.
*[_type == "project"] | order(orderRank asc) {
_id,
title,
slug,
tagline,
thumbnail {
asset->{url, metadata{dimensions}},
crop,
hotspot
},
categories[]->{ title },
layoutHint
}
Portable Text fields omitted here; includes prev/next project references for case-study navigation.
*[_type == "project" && slug.current == $slug][0] {
_id,
title,
tagline,
description,
deliverables,
clientUrl,
images[] {
asset->{url, metadata{dimensions}},
crop,
hotspot,
alt,
caption
},
previousProject->{ title, slug },
nextProject->{ title, slug }
}
client.fetch(projectsQuery) in generateStaticParams / server components; params feed
$slug for detail routes.
This repo has no Sanity client — copy queries into your app’s lib/queries.js.