【发布时间】:2014-07-30 01:47:43
【问题描述】:
我有一个 Jekyll 网站,我创建了一个播客源。
---
---
<?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>
除了<itunes:duration> 标记外,其他一切都有效。当我输入podcastlength: 2:07 时,它输出为<itunes:duration>127.0</itunes:duration>。根据我的研究,这就是其他人输出长度的方式。出于某种原因,Jekyll 似乎将其分解为秒而不是 2 分 7 秒。我在这里可能做错了什么?
【问题讨论】:
-
如果你在 "2.07" 周围加上逗号来强制 Jekyll 把它当作一个字符串而不转换它呢?
-
嗯...我想午夜编程对我来说不是最好的。我没有想到。今天晚些时候我会看看是否能解决它。