I have a Jekyll site that I have a podcast feed that I created.
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://mikewills.me/rss-podcast.xml" rel="self" type="application/rss+xml" />
<title>{{ site.name }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}</link>
{% for post in site.categories.podcast limit:15 %}
<item>
<title>{{ post.title }}</title>
<description>
<![CDATA[
{{ post.content | xml_escape }}
]]>
</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
{% if post.podcasturl %}<enclosure url="{{ post.podcasturl }}" length="{{ post.podcastsize }}" type="{{ post.podcasttype }}" />{% endif %}
</item>
{% endfor %}
</channel>
</rss>
Everything else works except for the <itunes:duration>
tag. When I enter in podcastlength: 2:07
it outputs as <itunes:duration>127.0</itunes:duration>
. Based on what I have researched, this is how everyone else is outputting the length. For some reason Jekyll seems to be breaking that down to seconds instead of 2 minutes and 7 seconds. What might I be doing wrong here?
If you are interested, full RSS source is here and an example post is here.
What @Julien Genestoux suggested worked.
"What if you put commas around "2.07" to force Jekyll to think of it as a string and hence not convert it? – Julien Genestoux Jul 30 at 13:31"