Skip to main content

Podcaster

Hosting a podcast and creating its website with Eleventy.

Using podcast and episode information in templates

All of the information you provide to Podcaster is available as part of the data cascade, and so you can refer to it in your templates like this {{ poscast.siteUrl }} or {{ episode.episodeNumber }}.

Podcaster calculates a few more values that you can use.

field value
podcast.copyrightNotice or copyrightNotice A copyright notice calculated from information you provided to Podcaster. Consists of the copyright symbol, a date or date range, and the author’s name.
episode.url The full URL of the episode’s file. Calculated from podcast.episodeUrlPrefix and episode.filename.

Note

Podcaster can also provide an optional pageTitle value which combines the page title and the site title, and which can be used in the <title> tag of a document’s <head>, for example.

It also provides two filters that you might find helpful.

filter function
readableSize Converts a number of bytes into a human-readable form — in megabytes to two decimal places. Suitable for displaying episode.size. If a number is provided as an argument to the filter, that number will be the number of decimal places shown.
readableDuration Converts a number of seconds into a human-readable form — h:mm:ss. Suitable for displaying episode.duration. If true is provided as an argument to the filter, any leading zero for hours will be omitted (mm:ss).

Note

Podcaster can also provide an optional readableDate filter which displays a date in the fullest possible localised format, and which is suitable for displaying post dates or recording dates.