Skip to content

News

When a News item is published or updated in Sanity, the system fetches type-specific fields in addition to the general variables. These fields provide the data needed for card display and filtering in the Resource Center.

Source file: algolia/custom_actions/types/getResourcesData.js


FieldSourceDescription
dateprops.draft?.datePublication date of the news item
organizersprops.draft?.repeater[]List of related people/sources (title only, no images)

News items use a straightforward date field:

date = props.draft?.date

The organizers are built from a repeater field in the Sanity document. Each entry contributes a title but no image:

for (let i = 0; i < props.draft?.repeater?.length; i++) {
organizers.push({
title: props.draft?.repeater[i].title,
image: false
})
}

Unlike Blogs (which query the people document type), News organizers are defined inline within the document’s repeater field.