Publications
Publication Records in Algolia
Section titled “Publication Records in Algolia”When a Publication is published or updated in Sanity, the system fetches type-specific fields in addition to the general variables. Publications follow a simple pattern similar to News and Research.
Source file: algolia/custom_actions/types/getResourcesData.js
Type-Specific Fields
Section titled “Type-Specific Fields”| Field | Source | Description |
|---|---|---|
date | props.draft?.date | Publication date |
organizers | props.draft?.repeater[] | List of authors/contributors (title only, no images) |
How It Works
Section titled “How It Works”date = props.draft?.dateOrganizers
Section titled “Organizers”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 })}