Customize 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
| Part | Default |
|---|---|
| Path | podcast/%/feed.xml, where % is the podcast ID |
| Contextual filter | Podcast ID |
| Filters | Published episodes of a published podcast |
| Sort | Authored on, newest first |
| Pager | None, so every episode is included |
| Caching | Tag 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.
| Setting | Feed tag | Default field |
|---|---|---|
| Title field | title | Title |
| Description field | description | Summary |
| Subtitle field | itunes:subtitle | Subtitle |
| Summary field | itunes:summary | Summary |
| Image field | itunes:image | Image, using the podcast_3000x3000 image style |
| Copyright field | copyright | Copyright |
| Type field | itunes:type | Type |
| Owner field, Email field | itunes:owner with itunes:name and itunes:email | Author, Email |
| Author field | itunes:author | Author |
| Category field | One category per comma-separated value | Category |
| Itunes Category field | itunes:category, nested under its parent category | iTunes Category |
| Block field | itunes:block | None |
| Explicit field | itunes:explicit | Explicit |
| Complete field | itunes:complete | Complete |
| Funding field | podcast:funding | Funding |
| License field, License URL field | podcast:license with url | License, License URL |
| Medium field | podcast:medium | Medium |
| People: name, role, link and image fields | One podcast:person per person, with role, group, href and img | The podcast's People, see People |
| Publication date field | pubDate | Authored 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.
| Setting | Feed tag | Default field |
|---|---|---|
| Title field | title, itunes:title | Label |
| Link field | link | Link to the episode's page |
| Description field | description, content:encoded | Shownotes |
| File field, File size field, Mimetype field | enclosure with url, length, type | Audio File, with the URL to file, File Length, and Mimetype formatters |
| Duration field | itunes:duration | Duration, read from the audio file when the episode is saved |
| Image field | itunes:image | Image, using the podcast_3000x3000 image style |
| Type field | itunes:episodeType | Type |
| Author field | itunes:author | Author |
| Explicit field | itunes:explicit | Explicit |
| Keywords field | itunes:keywords | Keywords |
| Publication date field | pubDate | Authored on |
| Episode number field | itunes:episode | Episode Number |
| Season field, Season name field | itunes:season, and podcast:season with name | Season, Season name |
| People: name, role, link and image fields | One podcast:person per person | The episode's People, see People |
| Transcripts: file, mimetype and language fields | One podcast:transcript per file, with url, type and language | Transcripts, see Transcripts |
| Alternate file, file size, mimetype and title fields | One podcast:alternateEnclosure per file | Alternate files, see Alternate enclosures |
| Chapters file URL field; chapter start, title, link and image fields | podcast:chapters, and psc:chapters with one psc:chapter per chapter | Chapters, see Chapters |
| GUID settings | guid | The 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:
| Setting | Attribute | Default formatter |
|---|---|---|
| Person name field | Name | Label, without link |
| Person role field | role and group | Field of the referenced entity: Role |
| Person link field | href | Field of the referenced entity: Link |
| Person image field | img | Field 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 asvisuals:cover art designer, also setsgroup. 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 istext/vttorapplication/x-subrip. languageis 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:chapterslinks 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:chapterslists 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
- Add the field under Fields on the Feed display. Choose This feed (override) if the change should not affect other displays.
- 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.
- 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.
| Setting | Feed tag | What it does |
|---|---|---|
| Podcast GUID | podcast:guid | Identifies the show across hosts and feed URLs. Generated from the feed URL when the feed is first requested, then stored and never changed. |
| Locked | podcast:locked with the podcast's Email as owner | Asks podcast platforms not to import the feed into another host. Platforms confirm a move with that email address. |
| Replaces an old feed | itunes:new-feed-url with this feed's URL | Tells Apple Podcasts that the show moved here. |
| New feed URL | None | Redirects 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
- Enter the show's existing GUID in Podcast GUID. Find it in the old feed's
podcast:guidtag, or on Podcast Index. Without it, the show gets a new GUID. - Enter each episode's old GUID in its Episode GUID field, see Episode GUIDs.
- Check Replaces an old feed.
- Redirect the old feed to the new one with a 301. Most hosts offer this when you leave them.
- After at least four weeks, uncheck Replaces an old feed. Keep the redirect.
Move a show away from this site
- Unlock the feed if it is locked, so the new host can import it.
- 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.
- 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.