Documentation
Site building

Customize the feed

Change which fields fill the RSS tags, how many episodes appear, how episodes are identified, and how to lock or move the feed.

Each podcast's feed is the Feed display of the Podcast Feed View. Edit it at Structure → Views → Podcast Feed (/admin/structure/views/view/podcast_feed).

Change the View with care once the podcast is listed in directories. Apps read the feed every time they refresh, so a broken setting reaches subscribers quickly.

How the View builds the feed

PartDefault
Pathpodcast/%/feed.xml, where % is the podcast ID
Contextual filterPodcast ID
FiltersPublished episodes of a published podcast
SortAuthored on, newest first
PagerNone, so every episode is included
CachingTag based; saving a podcast or episode refreshes the feed

The Format is Podcast RSS Feed, which writes the channel tags. Show is Podcast Episode Fields, which writes one <item> per episode. Each has a Settings dialog that maps View fields to feed tags.

Channel tags

Open Format: Podcast RSS Feed → Settings.

SettingFeed tagDefault field
Title fieldtitleTitle
Description fielddescriptionSummary
Subtitle fielditunes:subtitleSubtitle
Summary fielditunes:summarySummary
Image fielditunes:imageImage, using the podcast_3000x3000 image style
Copyright fieldcopyrightCopyright
Type fielditunes:typeType
Owner field, Email fielditunes:owner with itunes:name and itunes:emailAuthor, Email
Author fielditunes:authorAuthor
Category fieldOne category per comma-separated valueCategory
Itunes Category fielditunes:category, nested under its parent categoryiTunes Category
Block fielditunes:blockNone
Explicit fielditunes:explicitExplicit
Complete fielditunes:completeComplete
Funding fieldpodcast:fundingFunding
License field, License URL fieldpodcast:license with urlLicense, License URL
Medium fieldpodcast:mediumMedium
People: name, role, link and image fieldsOne podcast:person per person, with role, group, href and imgThe podcast's People, see People
Publication date fieldpubDateAuthored on

A tag is left out when its field is empty. Creator field is not used in the feed.

podcast:guid, podcast:locked and itunes:new-feed-url come from the podcast's ownership settings, not from View fields.

Each episode whose Type field outputs trailer also adds a podcast:trailer to the channel, see Trailers.

Episode tags

Open Show: Podcast Episode Fields → Settings.

SettingFeed tagDefault field
Title fieldtitle, itunes:titleLabel
Link fieldlinkLink to the episode's page
Description fielddescription, content:encodedShownotes
File field, File size field, Mimetype fieldenclosure with url, length, typeAudio File, with the URL to file, File Length, and Mimetype formatters
Duration fielditunes:durationDuration, read from the audio file when the episode is saved
Image fielditunes:imageImage, using the podcast_3000x3000 image style
Type fielditunes:episodeTypeType
Author fielditunes:authorAuthor
Explicit fielditunes:explicitExplicit
Keywords fielditunes:keywordsKeywords
Publication date fieldpubDateAuthored on
Episode number fielditunes:episodeEpisode Number
Season field, Season name fielditunes:season, and podcast:season with nameSeason, Season name
People: name, role, link and image fieldsOne podcast:person per personThe episode's People, see People
Transcripts: file, mimetype and language fieldsOne podcast:transcript per file, with url, type and languageTranscripts, see Transcripts
Alternate file, file size, mimetype and title fieldsOne podcast:alternateEnclosure per fileAlternate files, see Alternate enclosures
Chapters file URL field; chapter start, title, link and image fieldspodcast:chapters, and psc:chapters with one psc:chapter per chapterChapters, see Chapters
GUID settingsguidThe episode's UUID, not marked as a permalink

Dates must be in RFC 2822 format. The default date fields use the custom format D, d M Y H:i:s T; keep it if you replace them.

To count downloads, switch the File field's formatter to Download Tracker URL. See Analytics.

People

The People settings in the channel and the episode settings each map four View fields of the podcast's or episode's People reference field. Their values are matched by position:

SettingAttributeDefault formatter
Person name fieldNameLabel, without link
Person role fieldrole and groupField of the referenced entity: Role
Person link fieldhrefField of the referenced entity: Link
Person image fieldimgField of the referenced entity: Image
  • Field of the referenced entity outputs one field of each person as plain text: files, images, media and links as their absolute URL.
  • A role of the form group:role, such as visuals:cover art designer, also sets group. Roles come from the Podcast Taxonomy Project.
  • An episode's people replace the podcast's people in apps, for that episode.

Person images

Person images are media items, like the podcast and episode images. For Image media, the feed uses the image; for other media types, its thumbnail.

Trailers

A podcast:trailer has the same url, type, length and pubdate as the trailer episode's enclosure and pubDate, and the episode's itunes:season as season. With the Download Tracker URL formatter, trailer downloads are counted too. Apps preview the newest trailer.

Existing podcasts get the medium Podcast when you run drush updatedb, and the View gets the new fields.

Transcripts

The three transcript settings map View fields of the episode's Transcripts field, matched by position like people. They use the URL to file, Mimetype and Language code formatters.

  • VTT and SRT files have time codes, so their tags get rel="captions". The type is text/vtt or application/x-subrip.
  • language is left out for transcripts without a language. Apps then assume the feed's <language>.
  • The URL is the plain file URL, not a Download Tracker URL, so transcripts are not counted as downloads.
  • Web players that load transcripts from another domain need CORS headers on your files. Apps that read the feed on a server, such as Apple Podcasts, do not.

drush updatedb adds the Transcripts field to episodes and the three fields to the View.

Alternate enclosures

The four alternate enclosure settings map View fields of the episode's Alternate files field, matched by position. Each file becomes a podcast:alternateEnclosure with type, length, a title from the file's description (up to 32 characters), and a podcast:source with its URL.

With the Download Tracker URL formatter on the alternate file field, downloads of alternate files are counted too. A listener who downloads the main file and an alternate file within 24 hours counts once.

drush updatedb adds the Alternate files field to episodes and the four fields to the View.

Chapters

Chapters appear in the feed twice, for different apps:

  • podcast:chapters links to a JSON chapters file at /podcast-episode/{id}/chapters.json, the format of the Podcasting 2.0 namespace. The Chapters file URL field uses the Chapters URL formatter.
  • psc:chapters lists the chapters in the feed itself, as Podlove Simple Chapters. The start, title, link and image settings map the Chapters field's properties, matched by position, with the Chapter property formatter.

Chapter images are media items, like the other images. Chapters stored in an uploaded MP3 (ID3) or M4A (Nero) file are imported when the episode's Chapters field is empty; images in the file are not.

drush updatedb adds the Chapters field to episodes and the fields to the View.

Use a different field

  1. Add the field under Fields on the Feed display. Choose This feed (override) if the change should not affect other displays.
  2. Pick a formatter that outputs plain text or a plain URL, such as URL to file or Plain text. Markup inside a tag breaks some apps.
  3. Select the field in the channel or episode settings, then Apply and Save the View.

The settings only map fields to the tags listed above. Adding a tag that is not in the lists needs a template override or custom code.

Limit the number of episodes

The feed lists every episode by default. To shorten it, set the Feed display's Pager to Display a specified number of items. Apps only show what the feed contains, so older episodes disappear from new subscribers' lists.

Episode GUIDs

Podcast apps use each item's guid to recognize an episode. It comes from the episode's Episode GUID field. New episodes get their UUID, which never changes, even when you replace the audio file.

When you move a show to this site, enter each episode's old GUID in Episode GUID, so apps don't list the episodes again as new. Find it in the old feed's <guid> tags. Don't change the GUID of a published episode.

Sites that installed the module before this default keep the audio file's URL as the GUID. There, replacing an episode's audio file with a file at a different URL changes the GUID, and apps may show the episode again as new. Don't switch such a feed to the UUID: changing the GUID of existing episodes makes every app show them as new.

Lock or move the feed

Edit a podcast and open Feed ownership and moves.

SettingFeed tagWhat it does
Podcast GUIDpodcast:guidIdentifies the show across hosts and feed URLs. Generated from the feed URL when the feed is first requested, then stored and never changed.
Lockedpodcast:locked with the podcast's Email as ownerAsks podcast platforms not to import the feed into another host. Platforms confirm a move with that email address.
Replaces an old feeditunes:new-feed-url with this feed's URLTells Apple Podcasts that the show moved here.
New feed URLNoneRedirects this feed to the new URL with a 301.

The GUID is only generated when the Canonical base URL is set at Structure → Podcasts (/admin/structure/podcast), such as https://example.com. It is the host under which directories know your feeds. Leave it empty on staging sites, so they don't generate GUIDs from their own URL. Changing it later does not change existing GUIDs.

Move a show to this site

  1. Enter the show's existing GUID in Podcast GUID. Find it in the old feed's podcast:guid tag, or on Podcast Index. Without it, the show gets a new GUID.
  2. Enter each episode's old GUID in its Episode GUID field, see Episode GUIDs.
  3. Check Replaces an old feed.
  4. Redirect the old feed to the new one with a 301. Most hosts offer this when you leave them.
  5. After at least four weeks, uncheck Replaces an old feed. Keep the redirect.

Move a show away from this site

  1. Unlock the feed if it is locked, so the new host can import it.
  2. Enter the new feed URL in New feed URL and save. Apps and directories that request the old feed are redirected and follow the move.
  3. Keep the podcast, and with it the redirect, for at least four weeks. Deleting the podcast ends the redirect.

Change the feed template

The feed uses the views-view-podcast-rss.html.twig template from the module's templates directory. Copy it into your theme's templates directory and clear caches to override the channel markup. Episode items use Views' standard RSS row template.