Podcasts
Podcast Records in Algolia
Section titled “Podcast Records in Algolia”When a Podcast is published or updated in Sanity, the system fetches type-specific fields in addition to the general variables. Podcasts share much of their logic with Webinars — including localized speakers and regional record creation — but with key differences.
Source file: algolia/custom_actions/types/getResourcesData.js
Type-Specific Fields
Section titled “Type-Specific Fields”| Field | Source | Description |
|---|---|---|
typeName | client.fetch(queryTypeName) | Localized display name from post_type_names (not webinar_types) |
is_visible | props.draft?.is_hidden | Visibility flag (inverted: true if not hidden) |
is_webinar | Hardcoded false | Distinguishes podcasts from webinars |
type_slug | Initially ['podcasts'], then overridden | Podcast type slug |
audiences_slug | fetchTaxonomiesSlug() | Target audience slugs |
languages_slug | fetchTaxonomiesRepeaterSlug() | Available language slugs |
regions_slug | fetchTaxonomiesRepeaterSlug() | Region slugs for regional filtering |
regions | fetchWebinarLanguages() | Localized region names |
aundiences_languages | fetchEventsTaaxonomies() | Localized audience names |
regions_info | props?.draft?.repeater | Raw region repeater data |
organizers | GROQ query on people | Speakers with localized job titles |
Key Differences from Webinars
Section titled “Key Differences from Webinars”| Aspect | Webinars | Podcasts |
|---|---|---|
is_webinar | true | false |
typeName source | webinar_types taxonomy | post_type_names global |
type_slug initial value | From webinar_types | Hardcoded ['podcasts'] |
Localized Speakers
Section titled “Localized Speakers”Podcasts use the same localized speaker logic as webinars. See the Webinars documentation for the full implementation details.
The logic checks has_localized_speakers:
true→ Speakers are grouped by region.false→ All speakers apply to every region.
Regional Record Creation
Section titled “Regional Record Creation”Like webinars, a separate Algolia record is created for each region. The date resolution differs slightly:
date: customerData.regions_info[index].manual_date || type == 'podcasts' ? customerData.regions_info[index].date : customerData.regions_info[index].webinar_dateFor podcasts, the system uses date from the region info (not webinar_date), since they always match the type == 'podcasts' condition.
See the Webinars documentation for the full regional record creation code.